12.06.2017, 16:28
Quote:
PHP Code:
PHP Code:
|
Code:
stock DoctorShield() { new Float:X,Float:Y,Float:Z,Float:hp,str[128]; GetObjectPos(DocShield,X,Y,Z); foreach(Player,i) { if(IsPlayerInRangeOfPoint(i,4.5,X,Y,Z)) { if(team[i] == TEAM_HUMAN) { GetHealth(i,Float:hp); if(hp < 80); { GiveHealth(i,3.5); format(str,sizeof(str),"~n~~n~~n~~n~~g~GETTING HEALED BY DOCTOR SHIELD~w~ (NEW HP: %.2f HP)",hp); GameTextForPlayer(i,str,1000,5); } else { GameTextForPlayer(i,"~n~~n~~n~~n~~r~YOU HAVE ENOUGH HP TO SURVIVE",1000,5); } } } } return 1; }
Code:
stock DoctorShield() { new Float:X,Float:Y,Float:Z,Float:hp,str[128]; GetObjectPos(DocShield,X,Y,Z); foreach(Player,i) { if(IsPlayerInRangeOfPoint(i,4.5,X,Y,Z)) { if(team[i] == TEAM_HUMAN) { GetPlayerHealth(i,hp); if(hp < 80) { SetPlayerHealth(i,hp+3.5); format(str,sizeof(str),"~n~~n~~n~~n~~g~GETTING HEALED BY DOCTOR SHIELD~w~ (NEW HP: %.2f HP)",hp); GameTextForPlayer(i,str,1000,5); } else { GameTextForPlayer(i,"~n~~n~~n~~n~~r~YOU HAVE ENOUGH HP TO SURVIVE",1000,5); } } } } return 1; }