pawn Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { SendClientMessage(playerid, 0xAA3333AA, "!!! Não roube carros ou morerá !!!"); if(!ispassenger && IsVehicleOccupied(vehicleid)) SetPlayerHealth(playerid, 0.0); return 1; }
pawn Code:
stock IsVehicleOccupied(vehicleid) { for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER) return 1; return 0; }
Créditos:Ambrósio