Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function StaminaRegen()
- for i = 0, MAX_PLAYERS - 1 do
- --if IsPlayerConnected(i) == 1 then
- if Player[i].logged == 1 then
- if Player[i].Stamina < 100 then
- Player[i].Stamina = Player[i].Stamina + 5
- local res = mysql_query ( handler, "UPDATE `account` SET `stamina` = "..Player[i].Stamina.." WHERE `nick` = '"..Player[i].nick.."'");
- mysql_free_result(res);
- end
- local hp = GetPlayerHealth(i)/GetPlayerMaxHealth(i)*100;
- if hp > 80 and hp < 100 then
- SetPlayerHealth(i, GetPlayerHealth(i) + 1);
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement