11.03.2015, 13:12
How i can make this cmd /dropmask without type /dropmask 1 only /dropmask?
CMD codes:
CMD codes:
Код:
CMD:dropmask(playerid, params[]) { new string[128], type; if(sscanf(params, "d", type)) { SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /dropmask [type]"); SendClientMessageEx(playerid, COLOR_GRAD2, "Types: 1 = Mask"); return 1; } switch(type) { case 1: { if(PlayerInfo[playerid][pMask] == 0) { SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have a Mask to drop."); return 1; } format(string, sizeof(string), "You have dropped your Mask"); SendClientMessageEx(playerid, COLOR_WHITE, string); PlayerInfo[playerid][pMask] = 0; return 1; } default: { SendClientMessageEx(playerid, COLOR_WHITE, "Invalid license type! /dropmask [type]"); SendClientMessageEx(playerid, COLOR_GRAD2, "Types: 1 = Mask"); } } return 1; }