KroFly |
Дата: Воскресенье, 03.09.2017, 13:26 | Сообщение # 1
|
Знаток
Сообщений: 521
Статус: Offline
|
Помогите, исправить
Код CMD:sellbiz(playerid, params[]) { if(!pInfo[playerid][pBiz]) return SendClientMessage(playerid, COLOR_GREY, "Âû íå âëàäååòå áèçíåñîì!"); else if(sscanf(params, "dd", params[0], params[1])) return ShowPlayerDialog(playerid, dSellBiz, 0, "{FFCC00}Ïðîäàæà áèçíåñà", "{FFFFFF}Âû õîòèòå ïðîäàòü ñâîé áèçíåñ?\n\n{F04245}[Âíèìàíèå] {FFFFFF}Âàì âåðíóò òîëüêî 75% ñòîèìîñòè áèçíåñà\n{63BD4E}[Èíôîðìàöèÿ] {FFFFFF}×òîáû ïðîäàòü áèçíåñ èãðîêó, ââåäèòå /sellbiz [id èãðîêà] [ñòîèìîñòü]", "Ïðèíÿòü", "Îòìåíà"); else if(params[0] == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotOnline); else if(!gPlayerLogged[params[0]]) return SendClientMessage(playerid, COLOR_GREY, PlayerIsNotAuthorized); else if(params[0] == playerid) return SendClientMessage(playerid, COLOR_GREY, "Âû íå ìîæåòå ïðîäàòü áèçíåñ ñåáå!"); else if(pInfo[params[0]][pBiz]) return SendClientMessage(playerid, COLOR_GREY, "Ó èãðîêà óæå åñòü áèçíåñ!"); else if(!(1 <= params[1] <= 50000000)) return SendClientMessage(playerid, COLOR_GREY, "Ñòîèìîñòü îò 1$ äî 50 ìëí."); else if(ZapretDice[params[0]] == 1) return SendClientMessage(playerid, COLOR_GREY, "[Îøèáêà] Ó èãðîêà óæå åñòü îäíî àêòèâíîå ïðåäëîæåíèå!"); else if(pTemp[playerid][pSelectPlayer] != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "[Îøèáêà] Ó âàñ óæå åñòü îäíî àêòèâíîå ïðåäëîæåíèå. ×òîáû îòêàçàòüñÿ îò íåãî ââåäèòå /cancel"); else if(pTemp[params[0]][pTargetPlayer] != INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_GREY, "[Îøèáêà] Ó èãðîêà óæå åñòü îäíî àêòèâíîå ïðåäëîæåíèå!"); new i = pInfo[playerid][pBiz]; if(IsPlayerInRangeOfPoint(playerid, 5.0, BizInfo[i][bEntr][0], BizInfo[i][bEntr][1], BizInfo[i][bEntr][2]) || BizInfo[i][bVirtual] == GetPlayerVirtualWorld(playerid)) { if(!IsPlayerStream(3.0, playerid, params[0], 1)) return SendClientMessage(playerid, COLOR_GREY, "Èãðîê äîëæåí íàõîäèòüñÿ ðÿäîì ñ òîáîé!"); new string[144]; format(string, sizeof(string), "Âû ïðåäëàãàåòå %s êóïèòü âàø áèçíåñ", GetName(params[0])); SendClientMessage(playerid, COLOR_BLUE, string); format(string, sizeof(string), "%s ïðåäëàãàåò Âàì êóïèòü åãî áèçíåñ %s (%i) çà %i$", GetName(playerid), BizInfo[i][bName], i, params[1]); SendClientMessage(params[0], COLOR_BLUE, string); SendClientMessage(params[0], COLOR_GREEN, "Ïîñìîòðåòü äîïîëíèòåëüíóþ èíôîðìàöèþ î áèçíåñå - {FFFFFF}/binfo"); SendClientMessage(params[0], COLOR_WHITE, PlayerAccess); pTemp[playerid][pSelectPlayer] = params[0]; pTemp[params[0]][pTargetPlayer] = playerid; pTemp[params[0]][pTargetAction] = ACTION_SELL_BIZ; pTemp[params[0]][pActionPrice] = params[1]; pTemp[params[0]][pSellBizID] = i; } else SendClientMessage(playerid, COLOR_GREY, "Âû äîëæíû íàõîäèòüñÿ ëèáî â âàøåì áèçíåñå ëèáî âîçëå íåãî!"); return 1; }
|
|
|
|
=) |
Дата: Понедельник, 04.09.2017, 04:20 | Сообщение # 2
|
Боец
Сообщений: 271
Статус: Offline
|
Что именно не работает? Проверка какая-то не проходит и даже текста не появляется о предложении?
|
|
|
|