10.04.2010, 10:52
Done what you told me.
This is how it looks like now...
COMMAND:
TEXTDRAW:
And still doesn't works
do i have to do MAX_PLAYERS with CountDownTrue too?
This is how it looks like now...
COMMAND:
pawn Код:
if(HEALTHTIMER[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "This command can be used again after 1 minute");
return 1;
}
new Float:HHEALTH;
GetPlayerHealth(playerid, HHEALTH);
SetPlayerHealth(playerid, HHEALTH+50);
GameTextForPlayer(playerid, "~g~~h~Healed~w~!", 3000, 1);
//SetTimerEx("NewbieH", 60000, false, "i", playerid);//1 MINUTES
CountDownTrue = 1;
CountDownMinutes[playerid] = 1; //in minutes
CountDownSeconds[playerid] = 1; //in seconds
HEALTHTIMER[playerid] = 1;
format(string, sizeof(string), "%d:%d", CountDownMinutes[playerid], CountDownSeconds[playerid]);
TextDrawSetString(Text:CountText2, string);
TextDrawShowForPlayer(playerid,CountText2);
SetTimer("CountDownTimer", 1000, 0);
}
pawn Код:
public CountDownTimer(playerid)
{
if (CountDownTrue == 1)
{
CountDownSeconds[playerid]--;
if (CountDownSeconds[playerid] == 0)
{
CountDownSeconds[playerid] = 60;
if (CountDownMinutes[playerid] == 0)
{
CountDownTrue = 0;
TextDrawHideForPlayer(playerid, CountText2);
HEALTHTIMER[playerid] = 0;
}
CountDownMinutes[playerid]--;
}
new string[256];
format(string, sizeof(string), "%d:%d", CountDownMinutes[playerid], CountDownSeconds[playerid]);
TextDrawSetString(Text:CountText2, string);
SetTimer("CountDownTimer", 1000, 0);
return 1;
}
return 1;
}
do i have to do MAX_PLAYERS with CountDownTrue too?