Car spawn
#1

Removed
Reply
#2

Assuming you got your own code to retrieve the model ID from name...

pawn Код:
if(modelid == 420) return SendClientMessage(playerid,-1,"Error: You cannot spawn a Hydra!");
Reply
#3

Well if you want the whole thing:
pawn Код:
CMD:v(playerid,params[])
{
new tmp;
if(sscanf(params,"d",tmp)) SendClientMessage(palyerid,0xFF0000FF,"Usage /v [vehicleID]");
else if(tmp<400 || tmp>611 || tmp==520) SendClientMessage(playerid,0xFF0000FF,"Invalid vehicle ID");
else
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(palyerid,X,Y,Z);
CreateVehicle(tmp,X,Y+2,Z,0,color,color,respawntime);
}
return 1;
}
You will need ZCMD and sscanf tho
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)