need vehicle teleport
#1

need tele that can tele vehicle + player... pls help ive been trying for 4 days now
Reply
#2

Look in Useful functions topic, there is a function called SetPlayerPosEx or something.
Reply
#3

?? i mean i need a tele that can tele vehicles to and not players only...
Reply
#4

https://sampwiki.blast.hk/wiki/SetVehiclePos
Reply
#5

First get the players vehicle id.
Код:
new pvehicleid = GetPlayerVehicleID(playerid);
Then use SetPlayerPos
Код:
SetPlayerPos(playerid, Float:x, Float:y, Float:z);
After that use SetVehiclePos
Код:
SetVehiclePos(vehicleid, Float:x, Float:y, Float:z);
( Here the vehicleid is defined as pvehicleid, so its the right vehicle you're moving )

After that, use SetVehicleZAngle
Код:
SetVehicleZAngle(vehicleid, Float:a);
( Again the vehicleid is pvehicleid for the right vehicle )

For the final, use PutPlayerInVehicle
Код:
PutPlayerInVehicle(playerid, vehicleid, seatid);
( vehicleid is pvehicleid again, seatid is 0 for driver state )

Hope it helps

Greets
Niixie
Reply
#6

whats the players vehicle id?

cant u just give me the whole code<.< i'll fail at bracketing..
Reply
#7

pawn Код:
{
new pvehicleid = GetPlayerVehicleID(playerid);
SetPlayerPos(playerid, x, y, z); // You change the X, Y, Z with what you want
SetVehiclePos(pvehicleid, x, y, z); // You change the X, Y, Z with what you want
SetVehicleZAngle(pvehicleid, a); // You change the A with what you want
PutPlayerInVehicle(playerid, pvehicleid, 0); // This makes him the driver
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)