10.03.2017, 10:19
Ok i tried and this stuff is not working fine. Hes not keep regenerating my health its just give +1hp and its stop. And i can still use regenerating if my hp is over 100 so easily i can bug my hp. Look
Код:
#define REGENTILL 15000 // Time tell when will the REGEN stop #define REGENSTART 1000 // Time the regeneration will start new regentimer; new regen2timer; new isRegenerating[MAX_PLAYERS]; forward regenerating(playerid); forward regen2(playerid); public regenerating(playerid) { new Float:health; GetPlayerHealth(playerid, health); SetPlayerHealth(playerid, health+1); isRegenerating[playerid] = 1; regen2timer = SetTimer("regen2",REGENTILL, false); return 1; } public regen2(playerid) { KillTimer(regentimer); KillTimer(regen2timer); isRegenerating[playerid] = 0; } CMD:test(playerid) { regentimer = SetTimer("regenerating", REGENSTART, false); SendClientMessage(playerid,-1,"You are now regenerating HP"); return 1; }