if (strcmp(cmd, "/count", true) == 0)
{
if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"wait 5 second");
SetPVarInt(playerid,"CMDABUSE",GetTickCount()+5000);
ccd1();
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "countdown started by %s", pname);
SendClientMessageToAll(0x33CCFFAA, string);
return 1;
}
public ccd1()
{
GameTextForAll("~y~3", 500, 4);
SetTimer("ccd2", 900, 0);
}
public ccd2()
{
GameTextForAll("~r~2", 500, 4);
SetTimer("ccd3", 900, 0);
}
public ccd3()
{
GameTextForAll("~r~1", 500, 4);
SetTimer("ccd4", 900, 0);
}
public ccd4()
{
GameTextForAll("~y~]] ~r~GO ~y~]]", 1000, 4);
}
did you forward the ccd1 ccd2 ccd3 ccd4 ?? did you make the timer under gamemodeinit or filterscriptinit? did you set timer in onplayerconnect?! if not then thats it
|
if (strcmp(cmd, "/count", true) == 0)
{
if(CountCalled = 0)
{
if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"devi aspettare per rifare il comando");
SetPVarInt(playerid,"CMDABUSE",GetTickCount()+5000);
ccd1();
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "countdown startato da %s", pname);
SendClientMessageToAll(0x33CCFFAA, string);
printf("[CMD] %s ha usato il comando /count", pname);
CountCalled = 1;
}
if(CountCalled = 1)
{
SendClientMessageToAll(0x33CCFFAA,"non puoi startare il conto и gia partito");
}
return 1;
}
public ccd1()
{
GameTextForAll("~y~3", 500, 4);
SetTimer("ccd2", 900, 0);
}
public ccd2()
{
GameTextForAll("~r~2", 500, 4);
SetTimer("ccd3", 900, 0);
}
public ccd3()
{
GameTextForAll("~r~1", 500, 4);
SetTimer("ccd4", 900, 0);
}
public ccd4()
{
GameTextForAll("~y~]] ~r~GO ~y~]]", 1000, 4);
CountCalled = 0;
}
new IsCount = 0;
if (strcmp(cmd, "/count", true) == 0)
{
if(IsCount == 0)
{
if(GetPVarInt(playerid,"CMDABUSE")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"devi aspettare per rifare il comando");
SetPVarInt(playerid,"CMDABUSE",GetTickCount()+5000);
ccd1();
new string[256], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "countdown startato da %s", pname);
SendClientMessageToAll(0x33CCFFAA, string);
printf("[CMD] %s ha usato il comando /count", pname);
IsCount = 1;
}
if(IsCount == 1)
{
SendClientMessageToAll(0x33CCFFAA,"non puoi startare il conto и gia partito");
}
return 1;
}