SA-MP Forums Archive
Help - 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: Help (/showthread.php?tid=447247)



Help - volcaN131 - 29.06.2013

Hello again,
I am still working on my RP mode and this time I attempted to create a command of /acuspawn which spawns a vehicle by its ID, this command is only for detectives, I attempted to do it but I don't know how to create it since I am a beginner.
Thank you in advance, volcaN131.


Re: Help - Anak - 29.06.2013

you want this:
pawn Код:
CMD:veh(playerid,params[])
{
    new id,cor,cor1;
    if(sscanf(params, "ddd", id, cor,cor1))  SendClientMessage(playerid,-1, ,"USO: /veh [model] [color1] [color2]");
    else if (id < 400 || id > 611)  SendClientMessage(playerid,-1, "Between 400 and 611");
    else if (cor < 0 || cor1 > 126) SendClientMessage(playerid,-1, "Color between 0 and 126");
    else
    {
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(playerid, X,Y,Z);
            CreateVehicle(id,X+2,Y,Z,0.0,cor,cor1,-1);
    }
    return 1;
}