SA-MP Forums Archive
HELP ! - 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 ! (/showthread.php?tid=95178)



HELP ! - The_Tough - 02.09.2009

Код:
dcmd_kickall(playerid,params[]) {
#pragma unused params
	if(PlayerData[playerid][Level] == 4 || IsPlayerAdmin(playerid))
	{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
	new ownername[MAX_PLAYER_NAME],string[76];
	GetPlayerName(playerid,ownername,sizeof(ownername));
	format(string,sizeof(string),"[ SERVER ] You all have been kicked by server owner %s !",ownername);
	SendClientMessageToAll(COLOUR_CRIMSON,string);
	Kick(i);
	}
  }
	return 1;
}
Is there any way to prevent the playerid to get kicked ?


Re: HELP ! - Correlli - 02.09.2009

Add this check:
pawn Код:
if(i != playerid)
{
// continue with your code.
}



Re: HELP ! - The_Tough - 02.09.2009

very thanks !


Re: HELP ! - Correlli - 02.09.2009

You're welcome.