28.06.2008, 02:17
Quote:
Originally Posted by KANiS6111
GetVehicleDriver(vehicleid)
Returns the ID of the player driving in the vehicle. Returns '-1' if nobody is driving in the vehicle. Код:
stock GetVehicleDriver(vehicleid) { for(new i; i<MAX_PLAYERS; i++) { if (IsPlayerInVehicle(i, vehicleid)) { if(GetPlayerState(i) == 2) { return i; } } } return -1; } However, the one I made is a LITTLE bit faster and more server-friendly pawn Код:
|