Need hwelp with dialogs!!
#1

Hello, samp forum members need some help with y_command caller on dialog...
ERROR:
pawn Код:
(2356) : error 017: undefined symbol "ycmd_vbuy"
(2360) : error 017: undefined symbol "PriceArray"
(2360) : error 036: empty statement
(2360) : error 017: undefined symbol "i"
(2360) : fatal error 107: too many error messages on one line

CODE:
pawn Код:
case dialog_DealershipConfirm:
        {
            if(!response)
            {
                SetPlayerPos(playerid, pDlOldPos[playerid][0], pDlOldPos[playerid][1], pDlOldPos[playerid][2]);
                DestroyVehicle(pBuyingCar[playerid]);

                pBuyingCar[playerid] = 0, pBuyingCarModel[playerid] = 0;
                TogglePlayerControllable(playerid, true);

                SendClientMessage(playerid, -1, "{8EB2D6}[INFO]{FFFFFF}: Vehicle purchasement cancelled, taking you back to the vehicle dealership menu..");

                return ycmd_vbuy(playerid,pramas[],help); // FIRST error!
            }
            if(response)
            {
                for (new i; i != sizeof (PriceArray); ++ i) // ALLL THE REST ERRORS!!!
                {
                    if (PriceArray[i][0] == pBuyingCarModel[playerid])
                    {
                        if(GetPlayerMoney(playerid) >= PriceArray[i][1])
                        {
                            GivePlayerMoney(playerid, -PriceArray[i][1]);
                            AddPlayerVehicle(playerid, pBuyingCarModel[playerid], PriceArray[0][i]);
                        }

                        else if(GetPlayerMoney(playerid) < PriceArray[i][1])
                        {
                            SendClientMessage(playerid, -1, "{8EB2D6}[INFO]{FFFFFF}: You don't have enough money!");

                            SetPlayerPos(playerid, pDlOldPos[playerid][0], pDlOldPos[playerid][1], pDlOldPos[playerid][2]);
                            DestroyVehicle(pBuyingCar[playerid]);

                            pBuyingCar[playerid] = 0, pBuyingCarModel[playerid] = 0;
                            TogglePlayerControllable(playerid, true);

                            return ycmd_vbuy(playerid,pramas[],help);
                        }

                        break;
                    }
                }
                PlayerInfo[playerid][CarOwner] = pBuyingCar[playerid];
                PutPlayerInVehicle(playerid, pBuyingCar[playerid], 0);
                SendClientMessage(playerid, -1, "{8EB2D6}[INFO]{FFFFFF}: You have successfully bought your vehicle! Make sure to repark it!");
                TogglePlayerControllable(playerid, true);
            }
            return 1;
        }
Reply
#2

I don't use y_commands but from a look at its thread, it seems like the function you need to call is Command_ReProcess.

Maybe?
pawn Код:
Command_ReProcess(playerid, "/vbuy", false)
I couldn't find examples of it.
Reply
#3

Yse that worked.. thanks mate Again you saved me from head ache
Reply
#4

nvm, you solved already lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)