Need hwelp with dialogs!! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need hwelp with dialogs!! (
/showthread.php?tid=569202)
Need hwelp with dialogs!! -
Scrillex - 28.03.2015
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;
}
Re: Need hwelp with dialogs!! -
Konstantinos - 28.03.2015
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.
Re: Need hwelp with dialogs!! -
Scrillex - 28.03.2015
Yse that worked.. thanks mate

Again you saved me from head ache
Re: Need hwelp with dialogs!! -
nicholasramdhan - 28.03.2015
nvm, you solved already lol