"[%s] GMX in %d"
forward CountDown(cd);
public CountDown(cd)
{
new playerid;
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new cdt[32];
format(cdt, sizeof(cdt), "~b~GMX ~g~in ~y~%d", cd);
GameTextForAll(cdt, 1000, 3);
format(cdt, sizeof(cdt), "[%s] GMX in %d", sendername, cd);
SendClientMessageToAll(COLOR_RED, cdt);
if(cd > 1)
{
cd--;
GMXCD = SetTimerEx("CountDown", 1000, 0, "%d", cd);
}
else
{
GameTextForAll("~r~GMX", 1000, 3);
SendClientMessageToAll(COLOR_BLUE, "{FF0000}GMX");
SendClientMessageToAll(COLOR_BLUE, "{1100FF}GMX");
SendClientMessageToAll(COLOR_BLUE, "{E6FF00}GMX");
SendClientMessageToAll(COLOR_BLUE, "{FF0000}G{1100FF}M{E6FF00}X");
SendClientMessageToAll(COLOR_BLUE, "{E6FF00}G{FF0000}M{1100FF}X");
SendClientMessageToAll(COLOR_BLUE, "{1100FF}G{E6FF00}M{FF0000}X");
SendClientMessageToAll(COLOR_BLUE, "{E6FF00}GMX");
SendClientMessageToAll(COLOR_BLUE, "{1100FF}GMX");
SendClientMessageToAll(COLOR_BLUE, "{FF0000}GMX");
GameModeExit();
}
}
forward CountDown(cd, playerid);
public CountDown(cd, playerid)
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new cdt[32];
format(cdt, sizeof(cdt), "~b~GMX ~g~in ~y~%d", cd);
GameTextForAll(cdt, 1000, 3);
format(cdt, sizeof(cdt), "[%s] GMX in %d", sendername, cd);
SendClientMessageToAll(COLOR_RED, cdt);
if(cd > 1)
{
cd--;
GMXCD = SetTimerEx("CountDown", 1000, 0, "%d", cd);
}
else
{
GameTextForAll("~r~GMX", 1000, 3);
SendClientMessageToAll(COLOR_BLUE, "{FF0000}GMX");
SendClientMessageToAll(COLOR_BLUE, "{1100FF}GMX");
SendClientMessageToAll(COLOR_BLUE, "{E6FF00}GMX");
SendClientMessageToAll(COLOR_BLUE, "{FF0000}G{1100FF}M{E6FF00}X");
SendClientMessageToAll(COLOR_BLUE, "{E6FF00}G{FF0000}M{1100FF}X");
SendClientMessageToAll(COLOR_BLUE, "{1100FF}G{E6FF00}M{FF0000}X");
SendClientMessageToAll(COLOR_BLUE, "{E6FF00}GMX");
SendClientMessageToAll(COLOR_BLUE, "{1100FF}GMX");
SendClientMessageToAll(COLOR_BLUE, "{FF0000}GMX");
GameModeExit();
}
}
C:\Users\User\Desktop\Universal Mode\Multi.pwn(40792) : warning 202: number of arguments does not match definition
if (strcmp(cmd, "/GMXCD", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1338)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))return SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /GMXCD [Count]");
CountDown(strval(tmp));
return 1;
}
}
return 1;
}
Change CountDown(strval(tmp)); to CountDown(strval(tmp),playerid)j
|
[Diego_Elkapon] GMX in 10
[] GMX in 9
[] GMX in 8
if(cd > 1)
{
cd--;
GMXCD = SetTimerEx("CountDown", 1000, 0, "%d", cd);
}
if(cd > 1)
{
cd--;
GMXCD = SetTimerEx("CountDown", 1000, 0, "di", cd, playerid);
}
Update
pawn Код:
pawn Код:
|