Silentkick
#3

Loop through all online players and if targetid does not equal to i then send the message. You may want to consider using strlib's sprintf function for formatting your SendClientMessage. I have purposefully put an error or two into either of the methods. You've just got to spot them, to hopefully get your brain thinking

Non-Foreach Method:
Код:
for (new i; i <= GetPlayerPoolSize(); i++)
{
	if(IsPlayerConnected(playerid))
	{
		if(i != targetid)
		{
			SendClientMessage(i, -1, sprintf("AdmCmds: %s was kicked by %s, reason: %s", name, adminname, reason));
		}
	}
}
Foreach Method:
Код:
foreach (new i : Player)
{
	if(i != targetid)
	{
		SendClientMessage(i, -1, sprintf("AdmCmds: %s was kicked by %s, reason: %s", name, adminname, reason));
	}
}
Reply


Messages In This Thread
Silentkick - by Zeus666 - 24.10.2018, 20:03
Re: Silentkick - by NoSkillz - 24.10.2018, 20:06
Re: Silentkick - by Infin1ty - 24.10.2018, 20:08
Re: Silentkick - by Zeus666 - 24.10.2018, 20:35
Re: Silentkick - by GangstaSunny. - 24.10.2018, 20:38
Re: Silentkick - by Zeus666 - 24.10.2018, 20:53
Re: Silentkick - by Infin1ty - 24.10.2018, 20:55
Re: Silentkick - by KinderClans - 24.10.2018, 20:59
Re: Silentkick - by Infin1ty - 24.10.2018, 21:02

Forum Jump:


Users browsing this thread: 1 Guest(s)