Well I got countdown problem. when person do /wcd it should count down but it stuck at 42. So here are scripts
Thank you for help
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;
}