[HELP]/Goto command with vehicle
#1

Can someone help me to make goto command that will teleport with vehicle.
Reply
#2

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) SetVehiclePos(...);
else SetPlayerPos();
Don't just copy and paste this. It's a sort of template.
Reply
#3

also dont forget to put the player on vehicle
pawn Код:
// Your command codes here
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new vid=GetPlayerVehicleID(playerid); // gets the players vehicleid
SetPlayerPos(playerid,x,y,z); // x,y,z must be changed
SetPlayerInterior(playerid,interiorid); // interiorid must be changed (OPTIONAL: only use this if needed)
SetPlayerVirtualWorld(playerid,worldid); // worldid must be changed (OPTIONAL: only use this if needed)
SetVehiclePos(vid,x,y,z); // x,y,z must be changed same as player coordiantes.
LinkVehicleToInterior(vid,interiorid); // interiorid must be set to same value in interiorid for player (OPTIONAL: only use this if needed)
SetVehicleVirtualWorld(vid,worldid); // worldid must be set to same value in worldid for player (OPTIONAL: only use this if needed)
PutPlayerInVehicle(playerid,vid,0); // 0 = driver
}
// Put your more codes here
Note: You can get X,Y,Z coordinates from /save ingame and its save to your gta user files\samp folder
https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerInterior
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
https://sampwiki.blast.hk/wiki/SetVehiclePos
https://sampwiki.blast.hk/wiki/LinkVehicleToInterior
https://sampwiki.blast.hk/wiki/SetVehicleVirtualWorld
https://sampwiki.blast.hk/wiki/PutPlayerInVehicle
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)