Ich habe ein problem und zwar :
if(!strcmp("/SaveNS", cmd, true))
{
if(PlayerInfo[playerid][pAdmin] > 4)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:xxb, Float:yyb, Float:zzb, Float:aab;
GetVehiclePos(GetPlayerVehicleID(playerid), xxb,yyb,zzb);
GetVehicleZAngle(GetPlayerVehicleID(playerid), aab);
new part1[50], part2[50];
part1 = strtok(cmdtext, idx);
part2 = strtok(cmdtext, idx);
if(!strlen(part1) || !strlen(part2))
{
return SendClientMessage(playerid, Grey, "Verwendung: /SaveNS [Präfix] [ID] [Job/Fraktion (0/1)] [Job/Frakion] [C1] [C2]");
}
tmp = strtok(cmdtext, idx);
new jobfrak = strval(tmp);
tmp = strtok(cmdtext, idx);
new jobfrakid = strval(tmp);
tmp = strtok(cmdtext, idx);
new c11 = strval(tmp);
tmp = strtok(cmdtext, idx);
new c22 = strval(tmp);
new id = strval(part2);
new vehicleasdfmodel = GetVehicleModel(GetPlayerVehicleID(playerid));
format(str, sizeof str, "/Cars/%d.ini", id);
if(!fexist(str))
{
dini_Create(str);
if(INI_Open(str))
{
INI_WriteFloat("px", xxb);
INI_WriteFloat("py", yyb);
INI_WriteFloat("pz", zzb);
INI_WriteFloat("pa", aab);
INI_WriteInt("model", vehicleasdfmodel);
INI_WriteInt("c1", c11);
INI_WriteInt("c2", c22);
INI_WriteString("Key", "Staat");
INI_WriteString("ABC", part1);
INI_WriteInt("NSID", id);
INI_WriteInt("Fuel", 100);
INI_WriteInt("BuyPrice", 0);
INI_WriteInt("Lock", 0);
INI_WriteInt("Nitro", 0);
INI_WriteInt("Hyd", 0);
INI_WriteInt("Wheel", 0);
INI_WriteInt("Auspuff", 0);
INI_WriteInt("SeiteL", 0);
INI_WriteInt("SeiteR", 0);
INI_WriteInt("FB", 0);
INI_WriteInt("RB", 0);
INI_WriteInt("Spoiler", 0);
INI_WriteInt("Roof", 0);
INI_WriteInt("Hood", 0);
INI_WriteInt("Vent", 0);
INI_WriteInt("Lamp", 0);
INI_WriteInt("Paintjob", -1);
INI_WriteInt("Distance", 0);
if(jobfrak == 0) {
INI_WriteInt("JobCar", 1);
INI_WriteInt("Job", jobfrakid);
INI_WriteInt("FrakCar", 0);
INI_WriteInt("Frak", 0); }
else if(jobfrak == 1) {
INI_WriteInt("FrakCar", 1);
INI_WriteInt("Frak", jobfrakid);
INI_WriteInt("JobCar", 0);
INI_WriteInt("Job", 0); }
else if(jobfrak >= 2) {
INI_WriteInt("FrakCar", 0);
INI_WriteInt("Frak", 0);
INI_WriteInt("JobCar", 0);
INI_WriteInt("Job", 0); }
INI_Save();
INI_Close();
new i = id;
SendClientMessage(playerid, Grey, "Car gespeichert!");
DestroyVehicle(GetPlayerVehicleID(playerid));
PlayerCar[i][px] = xxb;
PlayerCar[i][py] = yyb;
PlayerCar[i][pz] = zzb;
PlayerCar[i][pa] = aab;
PlayerCar[i][model] = vehicleasdfmodel;
PlayerCar[i][c1] = c11;
PlayerCar[i][c1] = c22;
format(PlayerCar[i][Key], MAX_PLAYER_NAME, "Staat");
format(PlayerCar[i][ABC], 15, "%s", part1);
PlayerCar[i][NSID] = id;
PlayerCar[i][Fuel] = 100;
PlayerCar[i][BuyPrice] = 0;
PlayerCar[i][Lock] = 1;
PlayerCar[i][Nitro] = 0;
PlayerCar[i][Hyd] = 0;
PlayerCar[i][Wheel] = 0;
PlayerCar[i][Auspuff] = 0;
PlayerCar[i][SeiteL] = 0;
PlayerCar[i][SeiteR] = 0;
PlayerCar[i][FB] = 0;
PlayerCar[i][RB] = 0;
PlayerCar[i][Spoiler] = 0;
PlayerCar[i][Roof] = 0;
PlayerCar[i][Hood] = 0;
PlayerCar[i][Vent] = 0;
PlayerCar[i][Lamp] = 0;
PlayerCar[i][Paintjob] = -1;
PlayerCar[i][Distanz] = 0;
new ii = GetPlayerVehicleID(playerid);
if(jobfrak == 0) { PlayerCar[i][JobCar] = 1; PlayerCar[i][Job] = jobfrakid; PlayerCar[i][FrakCar] = 0; PlayerCar[i][Frak] = 0; }
else if(jobfrak == 1) { PlayerCar[i][JobCar] = 0; PlayerCar[i][Job] = 0; PlayerCar[i][FrakCar] = 1; PlayerCar[i][Frak] = jobfrakid; }
else if(jobfrak >= 2) { PlayerCar[i][JobCar] = 0; PlayerCar[i][Job] = 0; PlayerCar[i][FrakCar] = 0; PlayerCar[i][Frak] = 0; }
PlayerCar[i][vid] = CreateVehicle(PlayerCar[i][model], PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz], PlayerCar[i][pa], PlayerCar[i][c1], PlayerCar[i][c2], -1);
if(!PlayerCar[i][JobCar] && !PlayerCar[i][FrakCar]) SetVehicleNumberPlate(PlayerCar[i][vid], PlayerCar[i][Key]);
else if(PlayerCar[i][JobCar] || PlayerCar[i][FrakCar]) SetVehicleNumberPlate(PlayerCar[i][vid], PlayerCar[i][ABC]);
SetVehicleToRespawn(PlayerCar[i][vid]);
ChangeVehicleColor(PlayerCar[ii][FrakCar],c11,c22);
return 1;
}
}
}
}
return 1;
}
Wenn ich es eingebe passiert nichts und kann mir jemand sagen wieso er nicht fraktionscar erstellt ?
Lg