SA-MP Forums Archive
Message 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)
+--- Thread: Message help (/showthread.php?tid=370445)



Message help - Zex Tan - 20.08.2012

If a player got killed, I just want to show the logs to the admins only not player. Is there a way to do that?


Re: Message help - Shetch - 20.08.2012

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new string[128];
	format(string, sizeof(string), "Player: %d killed Player: %d", killerid, playerid);
    SendClientMessageToAdmins(COLOR_GREEN, string);
	return 1;
}

stock SendClientMessageToAdmins(color, string[])
{
	for (new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(PlayerData[i][AdminLevel] >= 1)
	        {
				SendClientMessage(i, color, string);
			}
		}
	}
}



Re: Message help - Zex Tan - 20.08.2012

ThanKs alot dude


Re: Message help - Shetch - 20.08.2012

No problem!