y_dialog and normal 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: y_dialog and normal dialogs (
/showthread.php?tid=480059)
y_dialog and normal dialogs -
dusk - 08.12.2013
Hello,
does y_dialog work with OnDialogResponse?
I have this code
pawn Код:
inline BizBuy(pid,dialogid,response,listitem,string:inputtext[])
{
printf("BUY DIALOG ID:%d",dialogid);
#pragma unused dialogid,listitem,inputtext
if(!response) return 1;
GivePlayerMoneyB(playerid,-bInfo[i][Price]);
format(bInfo[i][Owner],MAX_PLAYER_NAME,pInfo[pid][Username]);
format(string,sizeof(string),"Verslo savininkas:%s\nPavadinimas:%s\nPelnas:%d/min",
bInfo[i][Owner],bInfo[i][Name],bInfo[i][ProfitMin]);
Update3DTextLabelText(bInfo[i][Label],0x9ACB88FF,string);
format(string,sizeof(string),"Sveikiname nusipirkus verslą uћ %d LT",bInfo[i][Price]);
SendClientMessage(pid,GREEN,string);
return 1;
}
Dialog_ShowCallback(playerid,using inline BizBuy,DIALOG_STYLE_MSGBOX,"Verslo pirkimas",string,"Taip","Ne");
AFTER responding to this dialog, my login dialog appeared(its id is 1), so I added the print, it printed 0 and then 1.
When it printed out 0 there were no problems, but as soon as I was the first one I saw my login dialog again.
So again, shouldn't I use them borth at the same time or the problem is elsewhere?
Re: y_dialog and normal dialogs -
dusk - 09.12.2013
An extra question: why did the dialog ID was 0 and the second time 1? It's the same dialog :/
Re: y_dialog and normal dialogs -
dusk - 10.12.2013
bump
Re: y_dialog and normal dialogs -
dusk - 11.12.2013
la bump