SA-MP Forums Archive
SendClientMessage 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: SendClientMessage Help (/showthread.php?tid=114025)



SendClientMessage Help - Naruto4 - 17.12.2009

Umm i have just little quastion.How to send all admins a message ??
Код:
SendClientMessage(AccountInfo[playerid][aAdmin] > 0,LIGHTBLUE," balbla ");
i dont think that this will work :S


Re: SendClientMessage Help - cristab - 17.12.2009




Код:
stock SendStaffMessage(COLOR,Message[],lvl)
{
for(new i = 0; i < MAX_PLAYERS; i++)
	{
	  if(IsPlayerConnected(i))
	  {
	  	if (AccountInfo[i][aAdmin] >= adminlevel)
			{
				SendClientMessage(i, COLOR, text);
			}
		}
	}
	return 1;
}
usage:

SendStaffMessage(RED,"hello",1); //for level admin 1 or +
SendStaffMessage(RED,"hello",2); //for level admin 2 or +
SendStaffMessage(RED,"hello",3); //for level admin 3 or +
SendStaffMessage(RED,"hello",4); //for level admin 4 or +






Re: SendClientMessage Help - Naruto4 - 17.12.2009

i get 2 errors:
Код:
C:\Users\Mich\Desktop\Los Santos - Life Stories\gamemodes\ls.pwn(3231) : error 017: undefined symbol "adminlevel"
C:\Users\Mich\Desktop\Los Santos - Life Stories\gamemodes\ls.pwn(3233) : error 017: undefined symbol "text"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
should i just do new adminlevel; and new text[64];


Re: SendClientMessage Help - MenaceX^ - 17.12.2009

I think he meant
pawn Код:
if(AccountInfo[playerid][aAdmin]=>1)
{
  SendClientMessage(playerid,LIGHTBLUE,"blabla");
}



Re: SendClientMessage Help - Naruto4 - 17.12.2009

nah man.. I used this to scm to high admins when some low admin type /slap or smt like that


Re: SendClientMessage Help - cristab - 17.12.2009

sorry

stock SendStaffMessage(COLOR,Message[],)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (AccountInfo[i][aAdmin] >= lvl)
{
SendClientMessage(i, COLOR, Message);
}
}
}
return 1;
}