Keeping car when teleport..
#1

Hi i got a prob..

How do you keep the current car your in and teleport?

when i type /trans it just teleports the player.. not the car he in..

An annoying problem on my server.. help pls? will give creds...
Reply
#2

You need to add something like this:
pawn Код:
if(IsPlayerInAnyVehicle(playerid))//checks if they are in a vehicle
{
    SetVehiclePos(GetPlayerVehicleID(playerid)/*Gets their vehicle ID*/,X,Y,Z);//sets vehicle position
}
else//if they are not in a vehicle
{
    SetPlayerPos(playerid,X,Y,Z);//sets the player's position
}
##Edited
Reply
#3

NVM it works i forgot to delete the other line..

thx badg
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)