Can't get my car to TP with me
#1

Hey there fellow scripters,
I was just making a Teleport System on my server, i have made it so that Your character can teleport, but it leaves the car behind
Which is my problem, i want it to take the car with you
My Script...
pawn Код:
case 1://San Fierro
                    {
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -1641.9742, 431.1623, 7.1102);
                        SetVehiclePos(playerid, -1641.9742, 431.1623, 7.1102);
                    }
Reply
#2

pawn Код:
case 1://San Fierro
                    if(!IsPlayerInAnyVehicle(playerid))
                    {
                        SetPlayerVirtualWorld(playerid, 0);
                        SetPlayerInterior(playerid, 0);
                        SetPlayerPos(playerid, -1641.9742, 431.1623, 7.1102);
                    }
                    else
                    {
                        SetVehiclePos(GetPlayerVehicleID(playerid), -1641.9742, 431.1623, 7.1102);
                        SendClientMessage(playerid, -1, "Teleported !");
                    }
That should work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)