24.09.2015, 01:27
If player not a admin but still use the command
it send to the admin like Test:
it send to the admin like Test:
Код:
CMD:achat(playerid, params[]) { new string[128]; new result[128]; if (PlayerInfo[playerid][pAdmin] >= 3) if(sscanf(params,"s[128]",result)) { SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /achat [Message]"); } for (new i; i < MAX_PLAYERS; i++) { if (PlayerInfo[i][pAdmin] >= 3) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); if (PlayerInfo[i][pAdmin] >= 3)format(string, 128, "Admin Chat: %s: %s", pName, result); SendClientMessage(i, 0xFFFFFFFF, string); } } return 1; }