25.12.2013, 18:28
Add that at the begging of the script:
#define COLOR_ADMIN 0xFF0066FF
#define COLOR_RED 0xFF0000AA
Working Command:
#define COLOR_ADMIN 0xFF0066FF
#define COLOR_RED 0xFF0000AA
Working Command:
Код:
CMD:unban(playerid,params[]) { if(pInfo[playerid][Adminlevel] < 4)return SendClientMessage(playerid,COLOR_RED,"[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command."); new targetid, string[128];//R = Reason new Query[500]; if(sscanf(params, "u", targetid)) { SendClientMessage(playerid, COLOR_YELLOW, "Usage:{FFFFFF} /unban [ID] [Reason]"); return 1; } if(pInfo[playerid][Adminlevel] ==3 ) { SendClientMessage(playerid, COLOR_RED, "[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command."); return 1; } if(pInfo[playerid][Adminlevel] >= 4 || IsPlayerAdmin(playerid)) { pInfo[targetid][Banned] = 0; format(Query, sizeof(Query), "UPDATE users SET banned = %d WHERE username = '%s'", pInfo[targetid][Banned], targetid); db_query(DatabaseAcc, Query); format(string, sizeof(string), "[UN-BANNED] You have unbanned %s", targetid); SendClientMessage(playerid, COLOR_ADMIN, string); } return 1; }