carspawn - 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: carspawn (
/showthread.php?tid=183036)
carspawn -
Join7 - 13.10.2010
How to make your server when you write /uranus as you put the car uranus (car spawn)
Re: carspawn -
Alex_Valde - 13.10.2010
You need to make a command...
pawn Код:
if(strcmp(cmd, "/uranus", true) == 0)
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid, a);
AddStaticVehicle(558, x+2, y+3, z, a, 0, 0); // 558 is the uranus car id, 0, 0 are the color of a car...
return 1;
}
Re: carspawn -
Join7 - 13.10.2010
Can you do me a sample script with this code for all cars not only uranus?
Re: carspawn -
scripter1 - 13.10.2010
He just did. Use the code that he provided but just change the ID of the vehicle and the command name.
So for example: The Infernus command would be:
pawn Код:
if(strcmp(cmd, "/infernus", true) == 0) // "/infernus" is the command's name
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid, a);
AddStaticVehicle(411, x+2, y+3, z, a, 0, 0); // 411 is the infernus car id, 0, 0 are the color of a car...
return 1;
}