SA-MP Forums Archive
which is better - 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: which is better (/showthread.php?tid=635148)



which is better - TYDS - 02.06.2017

normal dialog or use include easydialog ?https://sampforum.blast.hk/showthread.php?tid=475838


Re: which is better - aoky - 02.06.2017

Well, use whatever you feel comfortable with. Everyone has different opinions but personal, easydialog is much easier to use from my experience.


Re: which is better - Stones - 02.06.2017

I to find it alot easier rather then using dialog ids, it makes it alot easier to track them rather then having to remember the id's for example.

Код:
#define DIALOG_REGISTER
Код:
if(dialogid == DIALOG_REGISTER)
under OnDialogResponse

Код:
return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register",string,"Register","");



Re: which is better - CheezIt - 03.06.2017

NORMAL DIALOG BY 1000000000000000000000000000000 TIMES!!! IT HAS BEEN CONFIRMED!!!


Re: which is better - Nero_3D - 03.06.2017

Normal dialogs are faster than easyDialogs, thats because it isn't optimised
No clue about y_dialog with y_inline functions

But you need to use switch which are faster than normal ifs
PHP код:
switch(dialogid) {
    case 
DIALOG_REGISTER: {}
    case 
DIALOG_LOGIN: {}




Re: which is better - wallee - 03.06.2017

Is easydialog really that slow? I started using it recently and i don't mind sacrificing a bit of performance for some cleaner code? :0


Re: which is better - aoky - 03.06.2017

Quote:
Originally Posted by wallee
Посмотреть сообщение
Is easydialog really that slow? I started using it recently and i don't mind sacrificing a bit of performance for some cleaner code? :0
A cleaner code is important.


Re: which is better - Pottus - 03.06.2017

Speed is not a factor dialogs are not called enough to have any effect. Just like command processors yes some are faster than others will it matter? No the difference is too small you need 100,000 iteration tests just to measure the difference. I would always go for y_inline/y_dialogs superior in every way to any other method.