12.06.2015, 08:15
Quote:
Код:
CMD:ac(playerid, params[]) { new tmp[256], playername[25], string[256]; if (adlvl[playerid] < 1) return 0; if (sscanf(params, "s[128]", tmp)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /ac [message]"); GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string), "Admin Chat [%s] %s", playername, tmp); SendMessageToAdmins(COLOR_ADMIN, string); print(string); return 1; } and i added #define SendMessageToAdmins. |
Код:
stock SendMessageToAdmins(color, message[]) { for(new i = 0; i < GetMaxPlayers(); i++) { if(pData[i][Admin] > 0) // You'll have to change this to your own var { SendClientMessage(i, color, message); } } }
tmp[256] isnt needed, you can use tmp[129](i cantremember if the null cell is needed)