24.03.2015, 10:23
Hello,
Ive scripted a little script for players that has below 20 hp a red pallete textdraw and a text on thier screen,
The thing is I want them to recieve a two lines message when they reach 20 HP I already scripted it the problem is that the client message is spamming if they have 20 HP i want them to recieve the client message only once here is my code:
I would be glad if someone could help or fix my code, Thanks in advance.
Ive scripted a little script for players that has below 20 hp a red pallete textdraw and a text on thier screen,
The thing is I want them to recieve a two lines message when they reach 20 HP I already scripted it the problem is that the client message is spamming if they have 20 HP i want them to recieve the client message only once here is my code:
Код:
public blood(playerid) { new Float:HP; GetPlayerHealth(playerid,HP); if(HP <= 20) { GameTextForPlayer(playerid,"~w~You've been criticaly wounded!",2000,6); SendClientMessage(playerid, COLOR_LIGHTRED, "** Shooting skills set to - low"); SendClientMessage(playerid, COLOR_LIGHTRED, "** Combat skills set to - low"); TextDrawShowForPlayer(playerid,Textdraw5); } else { TextDrawHideForPlayer(playerid,Textdraw5); }