SA-MP Forums Archive
[help]Cmd To admins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [help]Cmd To admins (/showthread.php?tid=83893)



[help]Cmd To admins - tony_fitto - 27.06.2009

Hey,
I need som help with my codered cmd, I want to do so when i type the codered it kick all players but not the admins thay will still bee online,

Код:
if (strcmp(cmdtext,"/codered",true) == 0)
 	{
	if (PlayerInfo[playerid][pAdmin] >= 1336)
	{
	SendClientMessageToAll(COLOR_RED, "|___________CODE RED___________|");
	SendClientMessageToAll(COLOR_RED, "The server is being attacked (D-DOSED)");
	SendClientMessageToAll(COLOR_RED, "Please Connect later when an admin is online!");
	SendClientMessageToAll(COLOR_RED, "Until then do not connect and STAY OUT!");
	SendClientMessageToAll(COLOR_RED, "Please Visit the foruns for more information!");
	SendClientMessageToAll(COLOR_RED, "http://Everestgaming.ucoz.net/!");
	SendClientMessageToAll(COLOR_RED, "|___________CODE RED___________|");
	for(new i = 0; i < MAX_PLAYERS; i++) if(i != playerid)Kick(i);
	return 1;
	}
}



Re: [help]Cmd To admins - woot - 27.06.2009

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) if(PlayerInfo[i][pAdmin] < 1) Kick(i);



Re: [help]Cmd To admins - tony_fitto - 27.06.2009

Quote:
Originally Posted by //exora
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) if(PlayerInfo[i][pAdmin] < 1) Kick(i);
Thanks i ganna try