03.01.2012, 21:24
I want to make an adminchat, but i can't get it finished, i want to send the client message to all admins but i don't have an idea to do that.
Im so far:
Im so far:
pawn Код:
if(strcmp(cmd, "/a", true) == 0)
{
if(pInfo[playerid][Admin] >= 0)
{
tmp = strtok(cmdtext,idx), tmp2 = strtok(cmdtext,idx);
new player1, level;
player1 = strval(tmp);
level = strval(tmp2);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /a [text]");
}
else
{
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
format(string,sizeof(string),"Adminchat (%s): %s", playername, tmp);
SendClientMessage(playerid, purple, string);
}
}
return 1;
}