Advertisement
KnightSAMP

GetvehicleDriver(vehicleid)

Jul 5th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.35 KB | None | 0 0
  1. GetvehicleDriver(vehicleid)
  2. {
  3.     for(new x = 0; x <= GetMaxPlayers(); x++)
  4.     {
  5.         if(IsPlayerInAnyVehicle(x))
  6.         {
  7.             if(GetPlayerVehicleID(x) == vehicleid)
  8.             {
  9.                 if(GetPlayerState(x) == PLAYER_STATE_DRIVE)
  10.                     return x;
  11.             }
  12.         }
  13.     }
  14.     return INVALID_PLAYER_ID;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement