Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Countdown problem

$
0
0
Well I got countdown problem. when person do /wcd it should count down but it stuck at 42. So here are scripts

Code:

new WCDVar = 4;
new WCDTimer;

CMD:wcd(playerid,params[])
{
        if(PlayerInfo[playerid][W] >= 1)
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
        if(PlayerInfo[i][W] >= 1) {
            WCDTimer = SetTimer("WCD", 1000, true);
            } return CMDMessageToW(playerid,"WCountDown");
        }
        return 1;
}

forward WCD();
public WCD()
{
    WCDVar--;
    new str[128];
    if(WCDVar == 0)
    {
            KillTimer(WCDTimer);
            WCDVar = 4;
    }
    else
    {
   
          format(str, sizeof(str), "%d", WCDTimer);
          GameTextForAll(str, 1000, 6);
    }
    return 1;
}

Thank you for help

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>