28.06.2017, 18:14
Код:
public OnPlayerUpdate(playerid) { new Float:health, Float:x, Float:y, Float:z; GetPlayerHealth(playerid, health), GetPlayerPos(playerid, x, y, z); if(IsPlayerInAnyVehicle(playerid)) { if(health <= 35 && GetPVarInt(playerid, "Dead") == 0) { RemovePlayerFromVehicle(playerid); SetPlayerPosEx(playerid,x,y,z+2); SetPlayerHealth(playerid, 35); CallRemoteFunction("Wounded","i", playerid); } } else { if(health <= 35 && GetPVarInt(playerid, "Dead") == 0) { SetPlayerHealth(playerid, 35); CallRemoteFunction("Wounded","i", playerid); } } }