Teleport without vehicle
#1

Hello!
I made a teleport command but when i use that command with a bike or any vehicle, then i will reach at that place without the vehicle.Why it is like that? can anyone tell me a solution for this?

command

pawn Код:
CMD:dearf(playerid,params[]) {
    SetPlayerPos(playerid,-1657.5400,-164.9457,14.1484);
    SetPlayerInterior(playerid,0);
    return 1;}
Reply
#2

Here you go:
pawn Код:
CMD:dearf(playerid,params[])
{
    if (GetPlayerState(playerid) == 2)
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), -1657.5400, -164.9457, 14.1484);
        SetPlayerInterior(playerid, 0);
    }
    else
    {
        SetPlayerPos(playerid, -1657.5400, -164.9457, 14.1484);
        SetPlayerInterior(playerid, 0);
    }
    return 1;
}
Reply
#3

Worked! ty dude +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)