How do I spawn vehicles - 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: How do I spawn vehicles (
/showthread.php?tid=148379)
How do I spawn vehicles -
[asg]davo - 16.05.2010
Ok I'm new to the whole scripting and I want learn how to spawn vehicles
so like /infernus and then u will spawn an infernus
can someone post how to do it pls..
Re: How do I spawn vehicles -
MummyKillerSLO - 16.05.2010
Code:
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/infernus",true))
{
new Float:xPos,Float:yPos,Float:zPos,Float:Ang;
GetPlayerPos(playerid,xPos,yPos,zPos); GetPlayerFacingAngle(playerid,Ang);
new VehicleID = CreateVehicle(411,xPos,yPos,zPos + 1,Ang,-1,-1,0); PutPlayerInVehicle(playerid,VehicleID,0);
SendClientMessage(playerid,COLOR_BLUE,"You spawned Infernus.");
return 1;
}
return 0;
}
Have fun!
Re: How do I spawn vehicles -
[asg]davo - 16.05.2010
Yeah but watdo I do for the pos and floats