04.12.2014, 21:38
How can i make callback which is called when player leaves the water?
IsPlayerInWater( playerid ) //Check if player is in any ocean from the GTA SA
public OnPlayerUpdate(playerid)
{
if(InWater[playerid] == true && !IsPlayerInWater(playerid))
{
InWater[playerid] = false;
CallLocalFunction("OnPlayerLeaveWater", "i", playerid);
return true;
}
if(IsPlayerInWater(playerid)) InWater[playerid] = true;
return 1;
}