SendClientMessage Help
#1

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
Reply
#2




Код:
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 +



Reply
#3

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];
Reply
#4

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

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

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)