SA-MP Forums Archive
Dialogs unique identifiers (no longer maintained) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialogs unique identifiers (no longer maintained) (/showthread.php?tid=98009)

Pages: 1 2 3 4


Dialogs unique identifiers (no longer maintained) - Donny_k - 18.09.2009

This is a list of the current dialog ids (or bases if you call them that) being used in released scripts, please make sure your id used doesn't conflict with the any ids on the current list:

0 - Admin Panel Example (Joe Staff)
1 - Simple AdminScript (GhostTTT)
1 - Click Players Name (Giacomand)
2 - Simple Rules (Allarw [u-rp.com])
6 - Ammunation (Grap)
1111 - Sounds (skot)
1200 - J-Tele (Jasen)
1337 - Weapon menu (V1ceC1ty)
1337 - Interior Menu (Pierhs)
2222 - Actions (skot)
2349 - Dtel (Donny)
3200 - Get any gun (Benne)
3300 - Sa Teleports (Benne)
3434 to 3449 - vDialog (Donny)
5009 - Fight styles (Sayaron)
5250 to 5285 - J-TextDrawHelper (Jasen)
6969 - Weather menu (V1ceC1ty)
8080 - Explosions (skot)
12345 to 12347 - Registration system (ErroR)

If you have released a dialog script please post your ids here and I'll update the list.

Please use THIS method from now on, I'll keep the list up but I will no longer update it.


Re: Dialogs unique identifiers - Joske_Vermeulen - 18.09.2009

perhaps we need a GetUnusedDialogId(&dialogid)/IsDialogIdInUse(dialogid) function


Re: Dialogs unique identifiers - Sergei - 18.09.2009

Is it really that hard to choose number from 0 to 32000 without selecting exact the same number as another time?


Re: Dialogs unique identifiers - V1ceC1ty - 18.09.2009

Ill update mine ill post the new id soon


Re: Dialogs unique identifiers - Donny_k - 18.09.2009

Quote:
Originally Posted by $ЂЯĢ
Is it really that hard to choose number from 0 to 32000 without selecting exact the same number as another time?
Most people will start at zero and work up from that to however many dialogs they have, if everyone does this we will end up with everyones responses firing at the same time.

Quote:
Originally Posted by V1ceC1ty
Ill update mine ill post the new id soon
Cheers.


Re: Dialogs unique identifiers - V1ceC1ty - 18.09.2009

1337


Re: Dialogs unique identifiers - Donny_k - 18.09.2009

Quote:
Originally Posted by V1ceC1ty
1337
Updated, cheers.

I wondered who would use that id first


Re: Dialogs unique identifiers - V1ceC1ty - 18.09.2009

Someones always got to use 1337 lol


Re: Dialogs unique identifiers - Kalcor - 18.09.2009

I need to be more careful with my examples. It wasn't really intended that people would use a hardcoded ID for their dialog but rather a define.

pawn Code:
#define ID_DIALOG_BASE 11000
#define ID_DIALOG_WEAPONLIST ID_DIALOG_BASE+1

ShowPlayerDialog(playerid,ID_DIALOG_WEAPONLIST,DIALOG_STYLE_LIST,"List of weapons:",listitems,"Select","Cancel");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == ID_DIALOG_WEAPONLIST) {
         .........
So say you get 2 filterscripts with conflicting dialogids, just change the ID_DIALOG_BASE to a new number and it's all fixed.



Re: Dialogs unique identifiers - yom - 18.09.2009

Or just use a enum that you place in a include file, which you #include in any scripts you want.. anyway sorry Kye, but this gui system sucks. Why not making something fully scriptable?


Re: Dialogs unique identifiers - Sergei - 18.09.2009

Quote:
Originally Posted by 0rb
Or just use a enum that you place in a include file, which you #include in any scripts you want.. anyway sorry Kye, but this gui system sucks. Why not making something fully scriptable?
Sucks? You can basically do all the things much easier now.


Re: Dialogs unique identifiers - Kyosaur - 18.09.2009

Quote:
Originally Posted by 0rb
Or just use a enum that you place in a include file, which you #include in any scripts you want.. anyway sorry Kye, but this gui system sucks. Why not making something fully scriptable?
+1

Well it doesn't suck, it just needs ... work.


Re: Dialogs unique identifiers - V1ceC1ty - 18.09.2009

what sucks about it?


Re: Dialogs unique identifiers - Kalcor - 18.09.2009

Quote:
Originally Posted by 0rb
Or just use a enum that you place in a include file, which you #include in any scripts you want.. anyway sorry Kye, but this gui system sucks. Why not making something fully scriptable?
Who said it was a GUI system? There is a GUI system in the client but these are called script dialogs. If you want to know more about what dialog boxes are search the web. I've never said anything about providing a scriptable GUI system.

And if you're going to correct me, in some sort of superior tone, why not explain to us all how an enum is better than a preprocessor define?


Re: Dialogs unique identifiers - V1ceC1ty - 18.09.2009

Everyone Fails besides Kye! YAY

Dialog Box
In graphical user interfaces, a dialog (or dialogue) box is a special window, used in user interfaces to display information to the user, or to get a response if needed. They are so-called because they form a dialog between the computer and the user—either informing the user of something, or requesting input from the user, or both. It provides controls that allow you to specify how to carry out an action.

GUI
A GUI offers graphical icons, and visual indicators, as opposed to text-based interfaces, typed command labels or text navigation to fully represent the information and actions available to a user. The actions are usually performed through direct manipulation of the graphical elements.


Re: Dialogs unique identifiers - erorcun - 18.09.2009

ErroR's Registration System

new dialog ids: 12345, 12346, 12347


Re: Dialogs unique identifiers - V1ceC1ty - 18.09.2009

my new weather menu is 6969


Re: Dialogs unique identifiers - Kalcor - 18.09.2009

Quote:
Originally Posted by Seif_ [adream-rp.com
]
It doesn't SUCK, what Orb meant was having people script their own GUI lists and etc.. []
I feel like a broken record repeating this over and over.

For those that seriously don't get it: SA-MP is server scripted.

The server-side pawn scripting was the natural evolution of the VC-MP server ini file. All the client-side code is written by the SA-MP team and we make it so you don't have to worry about things like syncing events between the client and server. Doing it this way is also a lot more secure and server owners do not have to give out their scripts if they don't want to.

The mouse is something client-side and it's not likely we'll ever provide the server with that information because as far as I'm concerned it doesn't need it. We may invoke callbacks on the server as a result of mouse actions, such as the clicking on a scoreboard name - which I've already done.

If you think this system sucks, that's fine, simply don't use it. Want to suggest a better system? You can do that too, but don't expect that all of your suggestions will be implemented when you're not the one having to do it.


Re: Dialogs unique identifiers - Donny_k - 18.09.2009

Thanks for the replies guys, I've updated it.


Re: Dialogs unique identifiers - Zeex - 19.09.2009

pawn Code:
stock CreatePlayerDialog(playerid, style, caption[], info[], button1[], button2[])
{
    new
      dialogid;
    dialogid = getproperty(0, "dialogs");
    ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
    setproperty(0, "dialogs", dialogid+1);
    return dialogid;
}
This function allows you create dialogs without worrying about their IDs as they are increased automatically, it is like when you create a textdraw you remember its ID to use it further
pawn Code:
new dialog = CreatePlayerDialog(playerid, 0, "caption", "info", "button1", "button2")