05.01.2012, 15:42
please help
pawn Код:
if(strcmp(cmd, "/a", true) == 0)
{
if(pInfo[playerid][Admin] >= 0)
{
tmp = strtok(cmdtext,idx);
new text;
text = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /a [text]");
}
else
{
GetPlayerName(playerid, adminname, sizeof(adminname));
format(string,sizeof(string),"Adminchat (%s): %s", adminname, text);
MessageToAdmins(purple,string);
}
}
return 1;
}
pawn Код:
public MessageToAdmins(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(pInfo[i][Admin] >= 0)
SendClientMessage(i, color, string);
}
return 1;
}