Stopping current countdown
#1

could someone help me out i am new here and got permissions to post topics so i have a countdown script it works fine but it want to make a new command which can stop current countdown i tried few times but it hasn't worked so here is the my count down codes please tell me how can i stop current countdown it is not stopping it just stops when count finishes like i did count down for 200 seconds then it doesn't stopping until 200 secs won't finishes and if i'am doing another /count while current running then it shows 2 countdowns so could someone help me to make a new cmd to stop the countdown while count running

this is the code

Код:
forward Counts(amount, const interval);
Код:
public Counts(amount, const interval)
{
    new string[250];
    TextDrawHideForAll(Textdrawcount0);
    TextDrawHideForAll(Textdrawcount1);
    if(amount > 0)
    {
        valstr(string, amount);
        SetTimerEx("Counts", interval, false, "ii", amount - 1, interval);
    }
    format(string, sizeof(string), string, interval, 3);
    TextDrawSetString(Textdrawcount0, string);
    TextDrawShowForAll(Textdrawcount0);
    return 1;
}
Код:
CMD:count(playerid, params[])
{
new counts;
if(sscanf(params, "d", counts))
        {
        SendClientMessage(playerid,COLOR_RED, "Usage: /count amount of countdowns");
        return 1;
        }
		if(counts == 0 || counts < 0 || counts > 3000)
		{
		SendClientMessage(playerid,COLOR_RED,"you can only count for 1-3000");
		return 1;
		}
        Counts(counts, 1000);
        return 1;
}
Reply


Messages In This Thread
Stopping current countdown - by Ronaldo1234 - 06.09.2016, 18:13
Re: Stopping current countdown - by AlexuTzVs - 06.09.2016, 20:56
Re: Stopping current countdown - by Ronaldo1234 - 06.09.2016, 21:09
Re: Stopping current countdown - by AlexuTzVs - 06.09.2016, 21:25
Re: Stopping current countdown - by Ultraz - 07.09.2016, 02:09
Re: Stopping current countdown - by SickAttack - 07.09.2016, 02:15
Re: Stopping current countdown - by Ronaldo1234 - 07.09.2016, 10:28
Re: Stopping current countdown - by Ronaldo1234 - 07.09.2016, 18:46
Re: Stopping current countdown - by Nero_3D - 07.09.2016, 18:58
Re: Stopping current countdown - by Ronaldo1234 - 08.09.2016, 05:51

Forum Jump:


Users browsing this thread: 2 Guest(s)