30.11.2015, 13:39
Quote:
Something like this:
Код:
CMD:accept(playerid, params[]) { new choice[32]; choice = "Teehee"; sscanf(params, "s[32]", choice); if(!strcmp(choice, "namechange", true)) { if(sscanf(params, "s[32]d", choice, id)) return SCM(playerid, COLOR_GREY, "USAGE: /accept namechange [id]"); if(PlayerInfo[playerid][AdminLevel] < 1) return AuthorMsg(playerid); new id; if(sscanf(params, "i", id)) return SCM(playerid, COLOR_GREY, "USAGE: /accept namechange [id]"); if(id == INVALID_PLAYER_ID) return SendClientMessageF(playerid, COLOR_GREY, "Invalid Player ID."); if(RequestNameChange[id] != 1) return SCM(playerid, COLOR_GREY, "That player is not requesting a name change."); } else return SCM(playerid, COLOR_GREY, "USAGE: /accept (hire, interview, gag, tie, ticket)"); return 1; } |
PHP код:
if(sscanf(params, "s[32]d", choice, id))
return SCM(playerid, COLOR_GREY, "USAGE: /accept namechange [id]");