13.04.2009, 20:02
Код:
if(strcmp(cmdtext, "/a", true) == 0) { if(dini_Int(file, "admin") <1) return SendClientMessage(playerid, COLOR, "You are not admin!"); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR, "Usage: /a [ur txt here]"); GetPlayerName(playerid, plyrname, sizeof(plyrname)); format(string,sizeof(string),"[ADMIN]: %s (lvl:%d): %s", plyrname, PlayerInfo[playerid][Admin], result); for(new i=0;i<MAX_PLAYERS;i++) { if(dini_Int(file, "admin") >= 1) SendClientMessage(i,COLOR,string); } return 1; }
and you can set only LeaD admin chat or something by changing 1 to 5 or max level you have, but if you have cmd spec then try hide that command......