carspawn
#1

How to make your server when you write /uranus as you put the car uranus (car spawn)
Reply
#2

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;
}
Reply
#3

Can you do me a sample script with this code for all cars not only uranus?
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)