16.10.2009, 17:53
Alright let me explain this
First we need a command to explain it better
This is an empty command . Now we make some Floats
Now we will use the floats
Now that we have created a vehicle and a command , now we can use the function
This will put the player in the vehicle spawned as soon as it spawns .. I hope this explains it .. Ask if this doesnt explain
First we need a command to explain it better
pawn Код:
new car; //on top of script
if(strcmp(cmdtext, "/car", true,4) == 0)
{
return 1;
}
pawn Код:
if(strcmp(cmdtext, "/car", true,4) == 0)
{
new Float:X,Float:Y,Float:Z,Float:A;
return 1;
}
pawn Код:
if(strcmp(cmdtext, "/car", true,4) == 0)
{
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
Car = CreateVehicle(X,Y,Z,A,1,1);
return 1;
}
pawn Код:
if(strcmp(cmdtext, "/car", true,4) == 0)
{
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
Car = CreateVehicle(411,X,Y,Z,A,1,1);
PutPlayerInVehicle(playerid,Car,0);
return 1;
}