21.01.2015, 22:40
Hey guys,
When I type /createbiz in game it says you must choose from 1-8 and I do but like Ill do /createbiz 1 and it still says "Business's ..... 1-8" Can you guys help me out?
When I type /createbiz in game it says you must choose from 1-8 and I do but like Ill do /createbiz 1 and it still says "Business's ..... 1-8" Can you guys help me out?
Код:
CMD:createbiz(playerid, params[]) { new type, string[128]; if(PlayerInfo[playerid][pAdmin] < 4) if(sscanf(params, "i", type)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /createbiz [type]"); SendClientMessage(playerid, COLOR_GREY, "TYPES: 1) 24/7 | 2) Clothes Shop | 3) Ammunation | 4) Club"); SendClientMessage(playerid, COLOR_GREY, "TYPES: | 5) Advertisement Agency[Buggd] | 6) Fast Food | 7) Gym | 8) VIP"); return 1; } if(type < 1 || type > 8) return SendClientMessage(playerid, COLOR_GREY, "Businesses are between 1 and 8."); for(new idx=1; idx<MAX_BIZ; idx++) { if(!BizInfo[idx][bType]) { // Getting Business Setup new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); // Making Business BizInfo[idx][bType] = type; format(BizInfo[idx][bOwner], 32, "The State"); BizInfo[idx][bX] = X; BizInfo[idx][bY] = Y; BizInfo[idx][bZ] = Z; BizInfo[idx][bMoney] = 0; BizInfo[idx][bProducts] = 0; BizInfo[idx][bSold] = 0; BizInfo[idx][bLevel] = 1; BizInfo[idx][bPrice] = 5000000; BizInfo[PlayerInfo[playerid][pBiz]][bStatus] = 1; BizInfo[idx][bPickup] = CreateDynamicPickup(1274, 1, X, Y, Z, 0); format(string, sizeof(string), "ID: %d\n%s\nOwner: %s\nStatus: For Sale\nPrice: $%d", idx, RBT(idx), BizInfo[idx][bOwner], BizInfo[idx][bPrice]); BizInfo[idx][bText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, X, Y, Z, 15); format(string, sizeof(string), "AdmWarn: %s has created business ID %d.", RPN(playerid), idx); ABroadCast(COLOR_DARKRED, string, 2 ); SaveBiz(); idx = MAX_BIZ; } } return 1; }