SA-MP Forums Archive
Class mesage - 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: Class mesage (/showthread.php?tid=602876)



Class mesage - Ax3l123 - 14.03.2016

Hi , how can i send a specific class a message like :
if i want to send a message to all admins which have lvl 1 how do i do that ?


Re: Class mesage - Phar - 14.03.2016

https://sampwiki.blast.hk/wiki/How_to_pa..._protect_skins


Re: Class mesage - BalkanEliteRP - 14.03.2016

Код:
stock SendAdminMessage(color, string[])
{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(PI[i][Admin] == 1) 
		{
			SendClientMessage(i, color, string);
		}
	}
}
Код:
SendAdminMessage(-1,"Message");



Re: Class mesage - YouServ - 14.03.2016

Using foreach & y_va :

PHP код:
stock SendClientMessageToAdmins(color, const msg[], va_args<>)
{
    new 
string[145];
    
va_format(stringsizeof(string), msgva_start<2>);
    foreach (new 
Player) if (IsPlayerConnected(i) && PlayerInfo[i][AdminLevel] == 1)
    {
        
SendClientMessage(icolorstring);
    }
    return 
1;