08.03.2014, 20:00
Why does it say Unknown Command when I type /createboombox?
Code:
Code:
Код:
//boombox cmds CMD:shopboombox(playerid, params[]) { if (PlayerInfo[playerid][pShopTech] < 1 && PlayerInfo[playerid][pAdmin] < 4) { SendClientMessageEx(playerid, COLOR_GREY, " You are not allowed to use this command."); return 1; } new giveplayerid, invoice; if(sscanf(params, "ui", giveplayerid, invoice)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /createboombox [Player ID] [invoice #]"); new string[128]; if(PlayerInfo[giveplayerid][pBoombox] == 0) { PlayerInfo[giveplayerid][pBoombox] = 1; format(string, sizeof(string), "You have been given a boombox from Admin %s. ", GetPlayerNameEx(playerid)); SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "[CREATEBOOMBOX] %s has given %s a boombox - Invoice %d", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), invoice); SendClientMessageEx(playerid, COLOR_GRAD1, string); Log("logs/shoplog.log", string); } else { SendClientMessageEx(playerid, COLOR_GRAD1, "This player allready have a boombox."); } return 1;