Question/Problem 2x+rep
#2

1st,
use this one
pawn Код:
stock SendMessageToAdmins1(color, msg[])
{
  for(new i=0; i<GetMaxPlayers(); i++)
  {
    if(IsPlayerConnected(i))
    {
        if(player_admin(i) || player_moderator(i)) // it should be "||" aka Or
        {
            SendClientMessage(i, color, msg);
        }
    }
  }
  return 1;
}
SendMessageToAdmins(-1, "%s has type "RED"/money",PlayerName(playerid));
so, the arguments are color and msg so you have to use "format" and just to make it clear to you
pawn Код:
SendMessageToAdmins(-1, "Someone has type "RED"/money");
it will be like this and works like "SendClientMessageToAll"


2nd.
pawn Код:
if(player_admin(playerid) || player_moderator(playerid) || player_junior(playerid))
use "||" as the one that you have is using "&&" aka And so you will have to be player_admin,moderator and junior at the same time.
meaning
you will have to be "player_admin" *and* "player_mod" *and* "player_junior" not
"player_admin" *or* "player_mod" *or* "player_junior" < this makes you use the command if you are any "1" of the three
Reply


Messages In This Thread
Question/Problem 2x+rep - by doreto - 12.04.2012, 11:12
Re: Question/Problem 2x+rep - by emokidx - 12.04.2012, 11:17
Re: Question/Problem 2x+rep - by doreto - 12.04.2012, 11:52
Re: Question/Problem 2x+rep - by emokidx - 12.04.2012, 11:58
Re: Question/Problem 2x+rep - by doreto - 12.04.2012, 12:04
Re: Question/Problem 2x+rep - by emokidx - 12.04.2012, 12:12
Re: Question/Problem 2x+rep - by Sphex - 12.04.2012, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)