Create Vehicle 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)
+--- Thread: Create Vehicle Command (
/showthread.php?tid=404073)
Create Vehicle Command -
ajmac22 - 01.01.2013
I am trying to make a command with this to type something like /elegy and make a elegy spawn next to me.
What I have not been able to find is what to use to do this, is there a CreateVehicle? I cant find anything. I just want a car to spawn next to me, so I cant save the coords or anything.
Thanks
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/elegy"))
{
return 1;
}
Re: Create Vehicle Command -
Infinity90 - 01.01.2013
pawn Код:
if(!strcmp(cmdtext, "/elegy"))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(522, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
return 1;
}