Quote:
Originally Posted by [03
Garsino ]
pawn Код:
dcmd_a(playerid, params[]) { new aText[128],aName[MAX_PLAYER_NAME],string[128]; if(sscanf(params,"s",aText)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"[USAGE] ''/a [text]''."); if(pInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You are not an Administrator with the required level."); GetPlayerName(playerid,aName,sizeof(aName)); format(string,sizeof(string),"[AdminChat]%s: %s",aName,aText); for(new i=0;i<=MAX_PLAYERS;i++) { if(pInfo[i][pAdmin] > 0) return SendClientMessage(i,COLOR_LIGHTBLUE,string); } return 1; }
1) sscanf need to be before your admin level check.
2) You dont need "!" in sscanf.
|
It works, there is only one problem. I can see other admins talking, but they cannot see me talking or see their own chat with /a.