SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 15/10/2009, 03:48 PM   #1
Donny_k
Gangsta
 
Donny_k's Avatar
 
Join Date: May 2006
Posts: 788
Reputation: 4
Default [REL] Dwrap, no more conflictions.

Dwrap is just a simple library to help solve the issue with conflicting dialog ids in our scripts, credit to Zeex for the idea and ****** for the tweak, all I did was put it in a library and added a few macros.

I've included a few defines and natives in the include also to make things quicker for scripters and there is an example of it's use at the bottom of the file.

Download: source on Pastebun.

Any bugs or issues you have or can think of which may occur then please let me know.
__________________
We don't stop playing because we grow old, we grow old because we stop playing.
Donny_k is offline   Reply With Quote
Old 15/10/2009, 03:56 PM   #2
Joe Staff
High-roller
 
Join Date: Aug 2007
Posts: 2,593
Reputation: 379
Default Re: [REL] Dwrap, no more conflictions.

Great work.


Lol, pastebun
Joe Staff is offline   Reply With Quote
Old 15/10/2009, 03:58 PM   #3
Donny_k
Gangsta
 
Donny_k's Avatar
 
Join Date: May 2006
Posts: 788
Reputation: 4
Default Re: [REL] Dwrap, no more conflictions.

Quote:
Originally Posted by Joe Staff
Great work.


Lol, pastebun
Thanks and "pastebun" lmao, you know that's staying
__________________
We don't stop playing because we grow old, we grow old because we stop playing.
Donny_k is offline   Reply With Quote
Old 16/10/2009, 11:41 AM   #4
saiberfun
High-roller
 
saiberfun's Avatar
 
Join Date: Nov 2008
Location: Germany
Posts: 3,304
Reputation: 383
Default Re: [REL] Dwrap, no more conflictions.

lolled at pastebun
but what does this actually do.
I don't have time to read and understand the script.
__________________
This could be your space to advertise. :3
saiberfun is offline   Reply With Quote
Old 16/10/2009, 11:58 AM   #5
Donny_k
Gangsta
 
Donny_k's Avatar
 
Join Date: May 2006
Posts: 788
Reputation: 4
Default Re: [REL] Dwrap, no more conflictions.

Quote:
Originally Posted by ┤ŞąiBЄЯҒПŋ├
lolled at pastebun
but what does this actually do.
I don't have time to read and understand the script.
AddDialog() ~ signs a property value to your dialog id so it won't conflict with other dialogs, no more need for macros, use a variable
HideDialog() ~ removes the dialog from your screen
ShowDialog* ~ shows a dialog of the type you used, each macro is different (msgbox, input, list) so no need to use DIALOG_STYLE_*

There is an example at the bottom of the script.
__________________
We don't stop playing because we grow old, we grow old because we stop playing.
Donny_k is offline   Reply With Quote
Old 16/10/2009, 12:34 PM   #6
Matthew_Murdoch
Huge Clucker
 
Join Date: Oct 2007
Posts: 450
Reputation: 0
Default Re: [REL] Dwrap, no more conflictions.

So in general...what does this do.
Matthew_Murdoch is offline   Reply With Quote
Old 16/10/2009, 12:50 PM   #7
Westie
Gangsta
 
Westie's Avatar
 
Join Date: Jul 2009
Posts: 857
Reputation: 63
Default Re: [REL] Dwrap, no more conflictions.

Reserves a number between zero and 2^31, which you can use to reserve dialogue IDs.
Westie is offline   Reply With Quote
Old 16/10/2009, 01:33 PM   #8
saiberfun
High-roller
 
saiberfun's Avatar
 
Join Date: Nov 2008
Location: Germany
Posts: 3,304
Reputation: 383
Default Re: [REL] Dwrap, no more conflictions.

Quote:
Originally Posted by Donny
Quote:
Originally Posted by ┤ŞąiBЄЯҒПŋ├
lolled at pastebun
but what does this actually do.
I don't have time to read and understand the script.
AddDialog() ~ signs a property value to your dialog id so it won't conflict with other dialogs, no more need for macros, use a variable
HideDialog() ~ removes the dialog from your screen
ShowDialog* ~ shows a dialog of the type you used, each macro is different (msgbox, input, list) so no need to use DIALOG_STYLE_*

There is an example at the bottom of the script.
ok so adddialog basicly reserves an id.
then u can use it with showdialog? and if yes wheres the dialogstyle set?
and do i need hide dialog?
__________________
This could be your space to advertise. :3
saiberfun is offline   Reply With Quote
Old 16/10/2009, 01:52 PM   #9
Donny_k
Gangsta
 
Donny_k's Avatar
 
Join Date: May 2006
Posts: 788
Reputation: 4
Default Re: [REL] Dwrap, no more conflictions.

Quote:
Originally Posted by ┤ŞąiBЄЯҒПŋ├
ok so adddialog basicly reserves an id.
Yes.

Quote:
then u can use it with showdialog?
Yes.

Quote:
and if yes wheres the dialogstyle set?
Same place it has always been set, look up "ShowPlayerDialog" on the Wiki.

Quote:
and do i need hide dialog?
I don't know do you ?

It's upto you if you want to hide a dialog not me dude.
__________________
We don't stop playing because we grow old, we grow old because we stop playing.
Donny_k is offline   Reply With Quote
Old 16/10/2009, 01:55 PM   #10
saiberfun
High-roller
 
saiberfun's Avatar
 
Join Date: Nov 2008
Location: Germany
Posts: 3,304
Reputation: 383
Default Re: [REL] Dwrap, no more conflictions.

Quote:
Originally Posted by Donny
I don't know do you ?

It's upto you if you want to hide a dialog not me dude.
hehe i kno
just i don'T get what it should be for
cuz they hide anywayz if a button gets used or enter is press don't they?
__________________
This could be your space to advertise. :3
saiberfun 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



All times are GMT. The time now is 10:55 AM.


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