DiogoB

[Pawn] GetVehicleDriver

Feb 7th, 2012
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.43 KB | None | 0 0
  1. GetvehicleDriver(vehicleid)
  2. {
  3.     static
  4.         Max = GetMaxPlayers(),
  5.         x;
  6.  
  7.     for(x = 0; x != Max; x++)
  8.     {
  9.         if(IsPlayerInAnyVehicle(x))
  10.         {
  11.             if(GetPlayerVehicleID(x) == vehicleid)
  12.             {
  13.                 if(GetPlayerState(x) == PLAYER_STATE_DRIVE)
  14.                 {
  15.                     return x;
  16.                 }
  17.             }
  18.         }
  19.     }
  20.     return INVALID_PLAYER_ID;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment