car spawning system
#2

as for the spawning command, asssuming you use sscanf and ZCMD
PHP код:
CMD:v(playerid,params[])
{
   new 
String[200];
   new 
Float:xFloat:yFloat:z;
   if(!
IsNumeric(params)) return SendClienMessage(playerid, -1"use only numbers");
   new 
vehiclee GetModelVehicle(params);
   if(!
strlen(params)) return SendClientMessage(playerid,  -1"[USAGE] /v (Car Name)");
   if(
vehiclee 400 || vehiclee 611) return SendClientMessage(playerid,  -1"[ERROR] That vehicle name does not exist in our database.");
   new 
Float:a;
   
GetPlayerFacingAngle(playerida);
   
GetPlayerPos(playeridxyz);
   new 
mrand =random(200);
   new 
frand =random(200);
   new 
PlayersVehicle CreateVehicle(vehicleex+2y+2za+90mrandfrand, -1);
   
LinkVehicleToInterior(PlayersVehicleGetPlayerInterior(playerid));
   
format(Stringsizeof(String), "[VEHICLE] You have spawned a vehicle. [Vehicle: %s]"NameVehicles[vehiclee 400]);
   
SendClientMessage(playerid,  -1String);
   return 
1;

PHP код:
CMD:vcolor(playerid,params[])
{
   new 
String[200];
   new 
xy;
   new 
vid GetPlayerVehicleID(playerid);
   if(
sscanf(params"ii"x,y))
   {
          
SendClientMessage(playerid,  -1"[USAGE] /vcolor (0-255) (0-255)");
          return 
1;
   }
   if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,  -1"[ERROR] You must be in a vehicle to use this command.");
   
ChangeVehicleColor(vid,xy);
   
format(Stringsizeof(String), "[VEHICLE] You have set your vehicle color to [%d] and[%d]"xy);
   
SendClientMessage(playerid, -1String);
   return 
1;

Reply


Messages In This Thread
car spawning system - by CSLangdale - 05.04.2016, 18:56
Re: car spawning system - by Vanter - 05.04.2016, 19:05
Re: car spawning system - by CSLangdale - 05.04.2016, 19:09
Re: car spawning system - by AndySedeyn - 05.04.2016, 19:09
Re: car spawning system - by CSLangdale - 05.04.2016, 19:12
Re: car spawning system - by AndySedeyn - 05.04.2016, 19:12
Re: car spawning system - by CSLangdale - 05.04.2016, 19:14
Re: car spawning system - by Vanter - 05.04.2016, 19:16
Re: car spawning system - by AndySedeyn - 05.04.2016, 19:16
Re: car spawning system - by CSLangdale - 05.04.2016, 19:21

Forum Jump:


Users browsing this thread: 1 Guest(s)