Ich hab das nicht so genau kapiert
meintest du das so???
if(strcmp(cmd, "/auto", true)==0)
{
if(Account[playerid][Admin] == 3)
{
new modelid,respawn,count;
new Float:isx,Float:isy,Float:isz;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "Benutze: /auto [modelid] [Respawn Time]");
return 1;
}
modelid = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "Benutze: /auto [modelid] [Respawn Time]");
return 1;
}
respawn = strval(tmp);
SCM(playerid,COLOR_GREEN,"/////////////////////////////////////////////////");
SCM(playerid,COLOR_LIGHTRED," Auto erstellt ");
SCM(playerid,COLOR_GREEN,"/////////////////////////////////////////////////");
GPP(playerid,Float:isx,Float:isy,Float:isz);
CreateVehicle(modelid,isx,isy,isz,0,0,0,respawn);
// for(new count=1;count<MAX_VEHICLES;count++)
format(string, sizeof(string),"Autos/vehicle_%d.sav",count);
while(count<MAX_VEHICLES && !CreateINI(string))count++;
{
CreateINI(string);
Autos[count][vModel] = modelid;
Autos[count][vEingepackt] = 0;
Autos[count][vArt] = 0;
Autos[count][vX] = isx;
Autos[count][vY] = isy;
Autos[count][vZ] = isz;
Autos[count][vA] = 0;
Autos[count][vFarbe1] = 0;
Autos[count][vFarbe2] = 0;
Autos[count][vVerkauf] = 0;
Autos[count][vPreis] = 0;
Autos[count][vKMStand] = 0;
Autos[count][vRKMStand] = 0;
strmid(Autos[count][vBesitzer], "Niemand", 0, strlen("Niemand"), 255);
strmid(Autos[count][vSch1], "Niemand", 0, strlen("Niemand"), 255);
strmid(Autos[count][vSch2], "Niemand", 0, strlen("Niemand"), 255);
strmid(Autos[count][vSch3], "Niemand", 0, strlen("Niemand"), 255);
Autos[count][vBeschlagnahmt] = 0;
Autos[count][vBX] = isx;
Autos[count][vBY] = isy;
Autos[count][vBZ] = isz;
Autos[count][vBA] = 0;
Autos[count][vRespawn] = respawn;
OnVehicleDataUpdate(count);
count = MAX_VEHICLES;
return 1;
}
}
else
{
SCM(playerid, COLOR_RED, "Du bist kein Admin!");
return 1;
}
}
// Edit überarbeitet