Teleport with Vehicle Help
#1

Hi guys i stucked with one question i tryed make own but it's working
i trying to make simple Teleport
i mean that when i teleporting so that vehicle where i set in that will teleport me with Vehicle
when i making simeple Teleport
with only
SetPlayerPos(playerid,);
it's teleporting only the character but the vehicle it's aisn't
how i make that it's Teleport my charcater with vehicle that i set inside thanks
Reply
#2

pawn Код:
if(strcmp(cmd, "/teleport", true) == 0)
{
    if(GetPlayerState(playerid) == 2)
    SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
    else SetPlayerPos(playerid,x,y,z);
    return 1;
}
Reply
#3

Thanks
Reply
#4

i recommend
pawn Код:
if(IsPlayerInAnyVehicle(playerid))
instead of
pawn Код:
if(GetPlayerState(playerid) == 2)
because if(GetPlayerState(playerid) == 2) teleports the vehicle only if "playerid" is driver on the other hand if(IsPlayerInAnyVehicle(playerid)) does for both (if DRIVER/PASSENGER)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)