29.08.2011, 09:21
I have this command :
But I can't understand for example, how to do /exitjourney, what function to use to save his position before he entered the journey ?
pawn Код:
if(strcmp(cmd,"/enterjourney",true)==0)
{
if(!IsPlayerInAnyVehicle(playerid))
{ //checks the player if he/she is in the vehicle.
new Float:x, Float:y, Float:z, vehicle; //these Float gets the player position that where the player is present
GetPlayerPos(playerid, x, y, z );//gets player position
GetVehicleWithinDistance(playerid, x, y, z, 8.0, vehicle);//gets the player distance from the vehicle
if(IsVehicleJourney(vehicle)){ //it checks the player vehicle is RC or not .
DOO_SetPlayerPos(playerid, 2513.2939,-1729.1245,778.6371);
}
}
}