08.04.2019, 18:55
I imagine what you're asking is how to stop players from surfing on top of people's cars?
If that's what you mean, I imagine a simple way to do it is to have a timer running each second and looping through MAX_PLAYERS, then check each player with GetPlayerSurfingVehicleID(playerid)
If the player isn't surfing a vehicle, the function will return INVALID_VEHICLE_ID
Example from the SA-MP wiki:
If that's what you mean, I imagine a simple way to do it is to have a timer running each second and looping through MAX_PLAYERS, then check each player with GetPlayerSurfingVehicleID(playerid)
If the player isn't surfing a vehicle, the function will return INVALID_VEHICLE_ID
Example from the SA-MP wiki:
Code:
new surf = GetPlayerSurfingVehicleID(playerid); if(surf == INVALID_VEHICLE_ID) SendClientMessage(playerid, COLOR_RED, "You are not surfing.");