SA-MP Forums Archive
Car spawn command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car spawn command (/showthread.php?tid=192022)



Car spawn command - Osviux - 21.11.2010

Does someone have a car spawing script so when someone writes /scar carid a car spawns near him?


Re: Car spawn command - Jeffry - 21.11.2010

Try:

pawn Код:
if(!strcmp(cmdtext, "/scar", false, 5))
{
    if(!strlen(cmdtext[5]) return SendClientMessage(playerid, red, "Usage: /scar [Model ID]");
    new veh = strval(cmdtext[5]);
    if(veh < 400 || veh > 611) return SendClientMessage(playerid, red, "ERROR: Invalid Vehicle Model");
    new Float:x, Float:y, Float:z, Float:a;
    GetPlayerPos(playerid, x,y,z); GetPlayerFacingAngle(playerid, a);
    CreateVehicle(veh, x,y,z, a, -1, -1, -1);
    return 1;
}
Just typed it fast. Dunno if it works. :/


Re: Car spawn command - Osviux - 21.11.2010

Ill try it, thanks.