SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 19/09/2011, 10:02 PM   #11
Gamer_Z
High-roller
 
Gamer_Z's Avatar
 
Join Date: Jun 2009
Location: Fontys Uni. - Applied Sciences (Currently doing the hardest possible study Fontys has to offer)
Posts: 2,641
Reputation: 848
Default Re: Named Dialogs - Give your dialogs names!

Final speed results till 20-09-2011:
Code:
FDLG is  AT LEAST 1350 times faster and up to 2707 times faster than NDLG
gDialog is AT LEAST 1328 times faster and up to 1874 times faster than NDLG
gDialog (speed mode) is up to 1.41 times faster than gDialog (slow mode)
FDLG is AT LEAST 1.45 times faster and up to 2.04 times faster than gDialog
__________________

New Site (http://gz0.nl)
Google code not working? Try GitHub
Gamer_Z is offline   Reply With Quote
Old 20/09/2011, 11:02 AM   #12
Diagram
Big Clucker
 
Diagram's Avatar
 
Join Date: Apr 2010
Location: Indonesia
Posts: 81
Reputation: 0
Default Re: Named Dialogs - Give your dialogs names!

Goodness, even in miliseconds it looks way slow indeed with the presence of FDLG.
Right then, I'll stick with FDLG.
Diagram is offline   Reply With Quote
Old 20/09/2011, 11:09 AM   #13
Wyu
Little Clucker
 
Join Date: Dec 2010
Posts: 39
Reputation: 73
Default Re: Named Dialogs - Give your dialogs names!

Tip: use 'static' instead of 'new __PRIV_*'
Wyu is offline   Reply With Quote
Old 20/09/2011, 11:23 AM   #14
Edvin
Gangsta
 
Edvin's Avatar
 
Join Date: Dec 2010
Posts: 919
Reputation: 63
Default Re: Named Dialogs - Give your dialogs names!

Good Job i really needed this
Edvin is offline   Reply With Quote
Old 21/09/2011, 06:15 AM   #15
Gamer_Z
High-roller
 
Gamer_Z's Avatar
 
Join Date: Jun 2009
Location: Fontys Uni. - Applied Sciences (Currently doing the hardest possible study Fontys has to offer)
Posts: 2,641
Reputation: 848
Default Re: Named Dialogs - Give your dialogs names!

Quote:
Originally Posted by Wyu View Post
Tip: use 'static' instead of 'new __PRIV_*'
first of all why? , the only thing I know is that if I declare a static variable anywhere it will still be available in global scope or if I declare it in a public it won't be recreated because it will keep existing, if you declare a new on a global scope it won't we re-created either.
__________________

New Site (http://gz0.nl)
Google code not working? Try GitHub
Gamer_Z is offline   Reply With Quote
Old 06/11/2011, 05:55 PM   #16
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,369
Reputation: 132
Default Re: Named Dialogs - Give your dialogs names!

I've got an idea for this. There is a function like GetFunctionIdx by Y_Less.
I think you can use it for dialogids. That would make the code MUCH faster.
wups is offline   Reply With Quote
Old 06/11/2011, 07:56 PM   #17
Gamer_Z
High-roller
 
Gamer_Z's Avatar
 
Join Date: Jun 2009
Location: Fontys Uni. - Applied Sciences (Currently doing the hardest possible study Fontys has to offer)
Posts: 2,641
Reputation: 848
Default Re: Named Dialogs - Give your dialogs names!

Quote:
Originally Posted by wups View Post
I've got an idea for this. There is a function like GetFunctionIdx by Y_Less.
I think you can use it for dialogids. That would make the code MUCH faster.
and how would I accomplish that? can u give an example?
__________________

New Site (http://gz0.nl)
Google code not working? Try GitHub
Gamer_Z is offline   Reply With Quote
Old 06/11/2011, 08:36 PM   #18
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,369
Reputation: 132
Default Re: Named Dialogs - Give your dialogs names!

Quote:
Originally Posted by Gamer_Z View Post
and how would I accomplish that? can u give an example?
You fetch a dialogid, by the vector name right? Just fetch the id by the function idx(every public has it's own unique id). Oh wait you can actually use funcidx.
dialogid = funcidx("DIALOG_Login");
wups is offline   Reply With Quote
Old 07/11/2011, 12:04 AM   #19
Gamer_Z
High-roller
 
Gamer_Z's Avatar
 
Join Date: Jun 2009
Location: Fontys Uni. - Applied Sciences (Currently doing the hardest possible study Fontys has to offer)
Posts: 2,641
Reputation: 848
Default Re: Named Dialogs - Give your dialogs names!

Quote:
Originally Posted by wups View Post
You fetch a dialogid, by the vector name right? Just fetch the id by the function idx(every public has it's own unique id). Oh wait you can actually use funcidx.
dialogid = funcidx("DIALOG_Login");
this script does exactly the opposite, you can see it as:

CallLocalFunction(GetDialogNameByID(dialogid),para ms...);
__________________

New Site (http://gz0.nl)
Google code not working? Try GitHub
Gamer_Z is offline   Reply With Quote
Old 07/11/2011, 02:19 PM   #20
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,369
Reputation: 132
Default Re: Named Dialogs - Give your dialogs names!

Oh, it was
Scripting_GetPublic(idx, buffer[33], search[] = "");
Don't know if you can do anything with it.
wups is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Callback Dialogs (Faster processing dialogs) clavador Includes 2 06/07/2011 10:59 AM
[Include] Sasi-Dialogs - A new way to add dialogs! Sasino97 Includes 11 02/05/2011 02:20 PM
Dialogs fissekarl Help Archive 6 17/04/2011 12:04 PM
[HELP] Help me with Dialogs [EnergY] Help Archive 4 12/02/2010 05:03 PM
Dialogs Conflict with other Dialogs with different... HydraX Help Archive 33 02/01/2010 12:33 AM


All times are GMT. The time now is 02:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.