SA-MP Forums Archive
ondialogresponse protection - 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: ondialogresponse protection (/showthread.php?tid=638790)



ondialogresponse protection - Bussyman - 06.08.2017

Hi,

Is there need to make protection, like when i showplayerdialog, and in ondialogresponse i showplayerdialog again with same id, like when player need to write password he write empty string, i reshow dialog again, but player can spam, and showplayerdialog will be calling a lot of times. So can player doing this harm server? maybe using cleo with low interval timer, automatic clicks, or not need to do that?


Re: ondialogresponse protection - Ghazal - 08.08.2017

If you wish to block it then check if the dialog is invalid under OnDialogResponse
pawn Код:
if(listitem < -1 || dialogid >= 32000 || dialogid < -32000)
    {
               //your code
    }