08.04.2018, 07:20
Hey!
So basically I wanna make a /namechange system where admin has to approve it. Now Im wondering what to do next after I made such command.
I tried to make it under OnPlayerCommandText and then /accept or /deny but I couldnt get it to work, help appreciated.
So basically I wanna make a /namechange system where admin has to approve it. Now Im wondering what to do next after I made such command.
Quote:
CMD:changename(playerid, params[]) //not working { new name[256], string[256]; if(sscanf(params, "s[256]", name)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /changename (Name)"); RequestedName[playerid] = name; RequestedNameID[playerid] = 1; SendClientMessage(playerid, -1, "[NAME CHANGE] Admin will review your request. Please note that request might get denied."); for (new i = 0; i != MAX_PLAYERS; ++i) { if(pInfo[i][pAdmin] >= 1) { format(string,sizeof(string), "{33CCFF}[NAME CHANGE] %s {FFFFFF}is requesting a name change to {33CCFF}%s. (/accept | /deny)", pInfo[playerid][pName], name); SendClientMessage(playerid, -1, string); } } return 1; } |