SA-MP Forums Archive
ZCMD create vehicle - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ZCMD create vehicle (/showthread.php?tid=511478)



ZCMD create vehicle - DaYviSoN - 05.05.2014

Whats wrong with my CMD?
When i compile it work but in server i use the cmd and vehicle dont spawn..

PHP код:
CMD:aveh(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return 0;
    new 
type,color,color2,Float:cPos[4];
    if(
sscanf(params"iii"type,color,color2) return SendClientMessage(playeridCOLOR_RED"/aveh [model] [color] [color]");
    if(
type 400 || type 611) return SendClientMessage(playerid,COLOR_RED"vehicle IDs between 400 - 611!");
    if(
color255 || color0) return SendClientMessage(playerid0xFFFFFF"Car color ID's: 0-255");
    if(
color2255 || color20) return SendClientMessage(playerid0xFFFFFF"Car color ID's: 0-255");
    
GetPlayerPos(playeridcPos[0], cPos[1], cPos[2]);
    
GetPlayerFacingAngle(playeridcPos[3]);
    
CreateVehicle(vehiclecPos[0], cPos[1]-3cPos[2], cPos[3], colorcolor2, -1);
    return 
1;




Re: ZCMD create vehicle - Nathan_Taylor - 05.05.2014

pawn Код:
CreateVehicle(vehicle, cPos[0], cPos[1]-3, cPos[2], cPos[3], color, color2, -1);
should be
pawn Код:
CreateVehicle(type, cPos[0], cPos[1]-3, cPos[2], cPos[3], color, color2, -1);
right?


Re: ZCMD create vehicle - DaYviSoN - 05.05.2014

You right :P