09.01.2012, 11:13
I just used a command "red alert" can you help me with this command please
The error i getting
The code lines
I hope you can help me guys
Thanks in advance
The error i getting
Код:
C:\Documents and Settings\GOD\Desktop\MY GM\gamemodes\wow.pwn(602) : warning 225: unreachable code C:\Documents and Settings\GOD\Desktop\MY GM\gamemodes\wow.pwn(623) : warning 225: unreachable code C:\Documents and Settings\GOD\Desktop\MY GM\gamemodes\wow.pwn(623) : warning 217: loose indentation C:\Documents and Settings\GOD\Desktop\MY GM\gamemodes\wow.pwn(3770) : warning 235: public function lacks forward declaration (symbol "KickAll") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Warnings.
pawn Код:
CMD:redalert(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new string[256];
new aname[256];
GetPlayerName(playerid,aname,sizeof(aname));
GameTextForAll("~r~Red Alert",7000,4);
format(string,sizeof(string), "Admin: %s has called Red Alert",aname);
SendClientMessageToAll(0xAA3333AA,string);
SendClientMessageToAll(0xAA3333AA,"You will all be kicked in ten seconds.");
RedAlertTimer = SetTimer("KickAll",10000,0);
SendClientMessage(playerid, 0xFFFF00AA, "Red Alert Successful. To Abort Type /abort");
printf("%s has initialized the red alert countdown.",aname);
return 1;
}
else
{
return 0;
}
return 1;
}
CMD:abort(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new string[256];
new aname[256];
GetPlayerName(playerid,aname,sizeof(aname));
GameTextForAll("~y~Red Alert Aborted",7000,4);
format(string,sizeof(string), "Admin: %s has canceled the Red Alert",aname);
SendClientMessageToAll(0x33AA33AA,string);
KillTimer(RedAlertTimer);
SendClientMessage(playerid, 0xFFFF00AA, "Red Alert Abort Successful.");
printf("%s has cancelled the red alert countdown.",aname);
return 1;
}
else
{
return 0;
}
return 1;
}
public KickAll()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
Kick(i);
}
}
}
Thanks in advance