31.08.2016, 23:59
found this in some random script
shouldn't it be like
Код:
public OnPlayerUpdate(playerid) { new Float:hp,Float:armour; new Float:health; new veh = GetPlayerVehicleID(playerid); GetPlayerHealth(playerid,hp); GetPlayerArmour(playerid,armour); GetVehicleHealth(veh, health); if(God[playerid] == 1) { if(hp < 999.0) SetPlayerHealth(playerid, 1000.0); if(armour < 999.0) SetPlayerArmour(playerid, 1000.0); if(health < 999.0) SetVehicleHealth(veh, 1000.0); RepairVehicle(veh); } else if(God[playerid] == 1) return 1; return 1; }
Код:
public OnPlayerUpdate(playerid) { new Float:hp,Float:armour; new Float:health; new veh = GetPlayerVehicleID(playerid); GetPlayerHealth(playerid,hp); GetPlayerArmour(playerid,armour); GetVehicleHealth(veh, health); if(God[playerid] == 1) { if(hp < 999.0) SetPlayerHealth(playerid, 1000.0); if(armour < 999.0) SetPlayerArmour(playerid, 1000.0); if(health < 999.0) SetVehicleHealth(veh, 1000.0); RepairVehicle(veh); } else if(God[playerid] == 0) return 1; //this return 1; }