Hallo
Ich habe bisher 507 Autos auf meinem Server. Nun erstellt er jedoch einfach keine Autos mehr. Ich weis snicht warum. Ich habe das mysql_SetIntNum geändert, jedoch erkenne ich daran keine Fehler
COMMAND:carcreate(playerid,params[])
{
new cmodelid;
new Float:X,Float:Y,Float:Z,Float:A;
if(sscanf(params, "d", cmodelid)) return SendClientMessage(playerid, COLOR_WHITE, "Verwendung: /carcreate [ModelID]");
if(GetPVarInt(playerid,"pAdmin") != 1337) return SendClientMessage(playerid,COLOR_GREY,"Du bist kein Admin Level 1337");
if(cmodelid < 400 || cmodelid > 611) return SendClientMessage(playerid, COLOR_GREY,"Die ModelID muss zwischen 400 und 611 liegen");
new FahrzeugLinie = cmodelid - 400;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
AddVehicle(AutoBestand, cmodelid, 1, 1, X, Y, Z, A, VehicleInfo[FahrzeugLinie][2], VehicleInfo[FahrzeugLinie][3],0,0,0,0,1);
SendClientMessage(playerid,COLOR_GREEN,"Fahrzeug erfolgreich erstellt");
return 1;
}
public AddVehicle(Carid, Carmodel, Carcolor1, Carcolor2, Float:CarX, Float:CarY, Float:CarZ, Float:CarA, CarCost, CarSell,Carfraktion,Carjob,Carnoob,Carverwahrt,Cartunebar)
{
VehicleSystem[Carid][CarID]=Carid;
strmid(VehicleSystem[Carid][CarNummer],"Terra",0,20,20);
VehicleSystem[Carid][Model]=Carmodel;
VehicleSystem[Carid][Locked]=0;
VehicleSystem[Carid][Fraktion]=Carfraktion;
VehicleSystem[Carid][Beruf]=Carjob;
VehicleSystem[Carid][Noob]=Carnoob;
VehicleSystem[Carid][Verwahrt]=Carverwahrt;
VehicleSystem[Carid][Tunebar]=Cartunebar;
VehicleSystem[Carid][Carx]=CarX;
VehicleSystem[Carid][Cary]=CarY;
VehicleSystem[Carid][Carz]=CarZ;
VehicleSystem[Carid][Cara]=CarA;
VehicleSystem[Carid][Adacx]= 0.0;
VehicleSystem[Carid][Adacy]= 0.0;
VehicleSystem[Carid][Adacz]= 0.0;
VehicleSystem[Carid][Adaca]= 0.0;
VehicleSystem[Carid][Color1]=Carcolor1;
VehicleSystem[Carid][Color2]=Carcolor2;
VehicleSystem[Carid][Price]=CarCost;
VehicleSystem[Carid][Sell]=CarSell;
strmid(VehicleSystem[Carid][Owner],"Ungekauft",0,20,20);
VehicleSystem[Carid][Pj]=-1;
VehicleSystem[Carid][Tt0]=0;
VehicleSystem[Carid][Tt1]=0;
VehicleSystem[Carid][Tt2]=0;
VehicleSystem[Carid][Tt3]=0;
VehicleSystem[Carid][Tt4]=0;
VehicleSystem[Carid][Tt5]=0;
VehicleSystem[Carid][Tt6]=0;
VehicleSystem[Carid][Tt7]=0;
VehicleSystem[Carid][Tt8]=0;
VehicleSystem[Carid][Tt9]=0;
VehicleSystem[Carid][Tt10]=0;
VehicleSystem[Carid][Tt11]=0;
VehicleSystem[Carid][Tt12]=0;
VehicleSystem[Carid][Tt13]=0;
CreateVehicleRow(Carid, Carmodel);
mysql_SetStringNum("Fahrzeuge", "Nummer", VehicleSystem[Carid][CarNummer], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "Locked", VehicleSystem[Carid][Locked], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "CFrak", VehicleSystem[Carid][Fraktion], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "CJob", VehicleSystem[Carid][Beruf], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "CNoob", VehicleSystem[Carid][Noob], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "CVer", VehicleSystem[Carid][Verwahrt], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "CTun", VehicleSystem[Carid][Tunebar], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "CarX", VehicleSystem[Carid][Carx], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "CarY", VehicleSystem[Carid][Cary], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "CarZ", VehicleSystem[Carid][Carz], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "CarA", VehicleSystem[Carid][Cara], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "AdacX", VehicleSystem[Carid][Adacx], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "AdacY", VehicleSystem[Carid][Adacy], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "AdacZ", VehicleSystem[Carid][Adacz], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetFloatNum("Fahrzeuge", "AdacA", VehicleSystem[Carid][Adaca], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "Color1", VehicleSystem[Carid][Color1], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "Color2", VehicleSystem[Carid][Color2], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "Price", VehicleSystem[Carid][Price], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "Sell", VehicleSystem[Carid][Sell], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetStringNum("Fahrzeuge", "Owner", VehicleSystem[Carid][Owner], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "PJ", VehicleSystem[Carid][Pj], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T0", VehicleSystem[Carid][Tt0], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T1", VehicleSystem[Carid][Tt1], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T2", VehicleSystem[Carid][Tt2], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T3", VehicleSystem[Carid][Tt3], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T4", VehicleSystem[Carid][Tt4], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T5", VehicleSystem[Carid][Tt5], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T6", VehicleSystem[Carid][Tt6], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T7", VehicleSystem[Carid][Tt7], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T8", VehicleSystem[Carid][Tt8], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T9", VehicleSystem[Carid][Tt9], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T10", VehicleSystem[Carid][Tt10], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T11", VehicleSystem[Carid][Tt11], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T12", VehicleSystem[Carid][Tt12], "CarID", VehicleSystem[Carid][CarID]);
mysql_SetIntNum("Fahrzeuge", "T13", VehicleSystem[Carid][Tt13], "CarID", VehicleSystem[Carid][CarID]);
new carr = CreateVehicle(VehicleSystem[Carid][Model],VehicleSystem[Carid][Carx],VehicleSystem[Carid][Cary],VehicleSystem[Carid][Carz]+1,VehicleSystem[Carid][Cara],VehicleSystem[Carid][Color1],VehicleSystem[Carid][Color2],600000);
SetVehicleNumberPlate(carr, VehicleSystem[Carid][CarNummer]);
IsBuyableCar[carr]=Carid;
SetVehicleTuning(carr);
AutoBestand ++;
GetVehicleParamsEx(carr,motor,lichter,alarm,schloss,haube,kofferraum,marker);
SetVehicleParamsEx(carr,0,lichter,alarm,schloss,haube,kofferraum,marker);
return 1;
}
stock mysql_SetIntNum(Table[], Field[], To, Where[], Where2)
{
new squery[128];
format(squery, 128, "UPDATE %s SET %s = '%d' WHERE %s = '%d'", Table, Field, To, Where, Where2);
mysql_query(squery);
return true;
}
MfG dUDALUS