Car system help
#5

Try this:
PHP код:
public OnPlayerCommandText(playeridcmdtext[])

   new 
indexcmd[20];
   
cmd strtok(cmdtextindex);
    if (
strcmp(cmd"/spawnauto"true) == 0)
    {
    new 
Float:vxFloat:vyFloat:vzvid
    
tmp strtok(cmdtextindex); 
    if (!
strlen(tmp)) return SendClientMessage(playerid0xF69521AA"Utilizza: /spawnauto [vehicleid/nome]"); 
    if (
IsNumeric(tmp) == 1
    { 
       
vid strval(tmp); 
    } else { 
      
vid GetVehicleIDFromName(tmp); 
    } 
    if ((
vid 400) || (vid 611) || (vid == 590) || (vid == 569) || (vid == 570) || (vid == 537) || (vid == 538) || (vid == 449)) 
    { 
       return 
SendClientMessage(playerid0xF69521AA"Veicolo non riconosciuto."); 
    } 
    else 
    { 
       
GetPlayerPos(playeridvxvyvz); 
       
CreateVehicle(vidvx random(9) - 4vy random(9) - 4vz0, -1, -1, -1); 
       new 
car GetPlayerVehicleID(playerid); 
       
format(stringa,sizeof(stringa),"{0xF69521AA}T{0xF69521AA}D{0xFFFF00AA} %d",random(999)); 
       
SetVehicleNumberPlate(carstringa); 
       
SendClientMessage(playerid0xFFFF00AA"Auto Spawnata con successo"); 
       return 
1

}
return 
0;

Reply


Messages In This Thread
Car system help - by kevi11 - 17.03.2016, 16:54
Re: Car system help - by N0FeaR - 17.03.2016, 16:56
Re: Car system help - by ATGOggy - 17.03.2016, 17:03
Re: Car system help - by kevi11 - 17.03.2016, 17:06
Re: Car system help - by ATGOggy - 17.03.2016, 17:11
Re: Car system help - by kevi11 - 17.03.2016, 17:18
Re: Car system help - by ATGOggy - 17.03.2016, 17:21
Re: Car system help - by kevi11 - 17.03.2016, 17:22
Re: Car system help - by AndySedeyn - 17.03.2016, 17:22
Re: Car system help - by AndySedeyn - 17.03.2016, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)