11.03.2012, 21:36
Hello.
I've had a chat previously, but it got bugged somehow, and I'm still unable to fix it. I decided to script another chat, but apparently "Everyone" in the server can see it. How can I make a new one/edit this one so only Administrators can see it?
I've had a chat previously, but it got bugged somehow, and I'm still unable to fix it. I decided to script another chat, but apparently "Everyone" in the server can see it. How can I make a new one/edit this one so only Administrators can see it?
pawn Код:
// CHAT ADMIN
CMD:a(playerid, params[])
{
new text[128];
if(PlayerInfo[playerid][pAdmin]>=1)
if(sscanf(params, "s[128]",text)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /a(dmin) [Text]");
format(text,sizeof(text),"[Admin]%s: %s",GetName(playerid),params);
foreach(Player, i)
{
if(PlayerInfo[playerid][pAdmin]>=1)
{
SendClientMessage(i,COLOR_RED,text);
}
}
return 1;
}