Advertisement
FoxHound

SetPlayerPosWithVehicle

Mar 6th, 2011
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.56 KB | None | 0 0
  1. forward SetPlayerPosWithVehicle(playerid, Float:x, Float:y, Float:z);
  2. public SetPlayerPosWithVehicle(playerid, Float:x, Float:y, Float:z)
  3. {
  4.     new pvehid,pseatid;
  5.     if(IsPlayerInAnyVehicle(playerid))
  6.     {
  7.         pvehid = GetPlayerVehicleID(playerid);
  8.         pseatid = GetPlayerVehicleSeat(playerid);
  9.         RemovePlayerFromVehicle(playerid);
  10.         SetPlayerPos(playerid, x, y, z);
  11.         SetVehiclePos(pvehid, x, y, z);
  12.         PutPlayerInVehicle(playerid, pvehid, pseatid);
  13.         return 1;
  14.     }
  15.     SetPlayerPos(playerid, x, y, z);
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement