[Include] Dialogs include - Adding new styles to SAMP GUI
#41

This is fucking awesome.

When will the model descriptions version come out?
I want to use it for making prev model dialogs based team selection
Reply
#42

Very epic.

Is this faster than mSelection? And please release the description version asap so that i can create my spawn dialogs!
Reply
#43

Description label version out!
  • Supports description labels for each model (you can also disable desc. for specific model by adding and empty desc. "")
  • Example added in the thread
  • Work perfect without bugs
  • For desc. dialog styles, the macro is: DIALOG_STYLE_PREVMODEL_DESC
Screen:


Download from the thread.

NOTE: You can still use non-desc. version from dialogs2.inc! Desc. version dialog have a custom function: ShowPlayerPrevModelDialog.

If you want to stick with R4, theres no problem because there is no new code update.
Reply
#44

Finally, thanks for dialogs2.Inc.
Reply
#45

Please add a feature by which we can set each listitem model's rotation and zoom.

Like: SetupPrevModelDialogListitem(dialogid, listitem, Float, Float:y, Float:z, Float:zoom);
Reply
#46

Good job!

But i have an error from CrashDetect plugin, when I'm using your include, while using default Dialog(MSGBOX):

Quote:

[17:32:10] [debug] Server crashed while executing new.amx
[17:32:10] [debug] AMX backtrace:
[17:32:10] [debug] #0 native CallLocalFunction () from samp-server.exe
[17:32:10] [debug] #1 0001edf4 in public OnDialogResponse (playerid=1, dialogid=327, response=1, listitem=-1, inputtext[]=@00993e3c "") at C:\Users\Kompiuteris\Desktop\GRP4\pawno\include\Di alogs.inc:632
[17:32:10] [debug] Native backtrace:
[17:32:10] [debug] #0 004743dc in ?? () from samp-server.exe
[17:32:10] [debug] #1 004010b6 in ?? () from samp-server.exe
[17:32:10] [debug] #2 5f8162ca in ?? () from plugins\crashdetect.dll
[17:32:10] [debug] #3 5f818b28 in ?? () from plugins\crashdetect.dll
[17:32:10] [debug] #4 5f8109c7 in ?? () from plugins\crashdetect.dll
[17:32:10] [debug] #5 5f81631a in ?? () from plugins\crashdetect.dll
[17:32:10] [debug] #6 5f7351a7 in ?? () from plugins\streamer.dll
[17:32:10] [debug] #7 0046eae1 in ?? () from samp-server.exe
[17:32:10] [debug] #8 004528f0 in ?? () from samp-server.exe
[17:32:10] [debug] #9 0049d629 in ?? () from samp-server.exe
[17:32:10] [debug] #10 004a8a4e in ?? () from samp-server.exe

Could you fix this?
Reply
#47

Man, it's awesome. Love it. Keep going dude! Really awesome.
Reply
#48

I just used ALS hook method 7 and those errors were fixed for me.

Update | R5 - 28th May, 2015
  • Fixed MSGBOX errors or crash
  • Updated to ALS hook method 7
Please download the latest R5 version from the thread.

This update has been done in both dialogs.inc and dialogs2.inc.
Reply
#49

Quote:
Originally Posted by Gammix
Посмотреть сообщение
I just used ALS hook method 7 and those errors were fixed for me.

Update | R5 - 28th May, 2015
  • Fixed MSGBOX errors or crash
  • Updated to ALS hook method 7
Please download the latest R5 version from the thread.

This update has been done in both dialogs.inc and dialogs2.inc.
That was fast! I will report if I will see any errors
Reply
#50



When I enter vehicle, server shows me box of dialog background. Why? When I exit the vehicle, it disappears.
Reply
#51

Quote:
Originally Posted by iWhite
Посмотреть сообщение


When I enter vehicle, server shows me box of dialog background. Why? When I exit the vehicle, it disappears.
Thats not a problem related to the include i think. Maybe a problem related to your gamemode?

Just make sure you define FILTERSCRIPT if using in a filterscript.
Reply
#52

Hi,

Great include but I have found a bug that caused my server to crash. The bug is on line 758 (or at-least this is what crashdetect reported), and occurs when either the listitem or inputttext is not used, listitem was reported to be -1 and inputtext was reported to be @01453144 "".

[19:41:16] [debug] #1 0000745c in public OnDialogResponse (playerid=0, dialogid=123, response=1, listitem=-1, inputtext[]=@01453144 "") at [Removed]\pawno\include\gamemode\dialogs2.inc:758

Other than that, works fine. I've fixed this issue temporarily on my own server, if this is an include issue then might crash other servers too.

Occurs if you use a DIALOG_STYLE_MSGBOX dialog.
Reply
#53

Quote:
Originally Posted by DanLore
Посмотреть сообщение
Hi,

Great include but I have found a bug that caused my server to crash. The bug is on line 758 (or at-least this is what crashdetect reported), and occurs when either the listitem or inputttext is not used, listitem was reported to be -1 and inputtext was reported to be @01453144 "".

[19:41:16] [debug] #1 0000745c in public OnDialogResponse (playerid=0, dialogid=123, response=1, listitem=-1, inputtext[]=@01453144 "") at [Removed]\pawno\include\gamemode\dialogs2.inc:758

Other than that, works fine. I've fixed this issue temporarily on my own server, if this is an include issue then might crash other servers too.

Occurs if you use a DIALOG_STYLE_MSGBOX dialog.
The crash might not be related to this include at all as every include with hooked callbacks are shown in crashdetect's results. Also if you notice, you'll see #1 which is the callback but what's #0? You need to know that otherwise you're not going to find what exactly caused it very easily.

Also since you temporary fixed it, a solution would be good for everybody else (in case it's caused by the include).

@Gammix: Very good work. Believe it or not, I've never used those preview models stuff and I'm kind of bored to do it anytime soon so this include comes in handy.
Reply
#54

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The crash might not be related to this include at all as every include with hooked callbacks are shown in crashdetect's results. Also if you notice, you'll see #1 which is the callback but what's #0? You need to know that otherwise you're not going to find what exactly caused it very easily.

Also since you temporary fixed it, a solution would be good for everybody else (in case it's caused by the include).

@Gammix: Very good work. Believe it or not, I've never used those preview models stuff and I'm kind of bored to do it anytime soon so this include comes in handy.
Sure thank you for bringing this up.

[19:41:16] [debug] #0 native CallLocalFunction () from samp-server.exe

The only thing I did to fix it was make sure that it's not possible for listitem to be -1 and for the string length of inputtext to be less than 1 in the following code. I did this for both as I'm not sure whether a -1 would cause a server crash with a dialog response.

PHP код:
return CallLocalFunction("Dialog_OnDialogResponse""iiiis"playeriddialogidresponselistiteminputtext); 
Reply
#55

Yeah, it's a known bug that CallLocalFunction crash the server if the string passed as argument is NULL/empty. ZCMD is a good example of preventing this by passing "\1" instead.
Reply
#56

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Thats not a problem related to the include i think. Maybe a problem related to your gamemode?

Just make sure you define FILTERSCRIPT if using in a filterscript.
Script in my gamemode looks good. Before your include everything worked fine. Maybe when you create static textdraws they get new IDs from 0 again? So when I'm showing my speedometer textdraw, server shows 2 textdraws - speedometer's and dialog's, because they have the same ID?
Reply
#57

Quote:
Originally Posted by DanLore
Посмотреть сообщение
Sure thank you for bringing this up.

[19:41:16] [debug] #0 native CallLocalFunction () from samp-server.exe

The only thing I did to fix it was make sure that it's not possible for listitem to be -1 and for the string length of inputtext to be less than 1 in the following code. I did this for both as I'm not sure whether a -1 would cause a server crash with a dialog response.

PHP код:
return CallLocalFunction("Dialog_OnDialogResponse""iiiis"playeriddialogidresponselistiteminputtext); 
Someone already reported that and if you haven't seen it before your post, i have released R5 version, which will probably fix this.

There is no way those values can be negative with this include, my include only adds a new dailog style (DIALOG_STYLE_PREVMODEL), it does not modifies the other styles nor handles them.

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Yeah, it's a known bug that CallLocalFunction crash the server if the string passed as argument is NULL/empty. ZCMD is a good example of preventing this by passing "\1" instead.
Yes your are right, but R5 version uses hooking method 7 and which will fix this issue as well.

Quote:
Originally Posted by iWhite
Посмотреть сообщение
Script in my gamemode looks good. Before your include everything worked fine. Maybe when you create static textdraws they get new IDs from 0 again? So when I'm showing my speedometer textdraw, server shows 2 textdraws - speedometer's and dialog's, because they have the same ID?
Can you show your code please?
Also, may i know which version are you using (dialogs or dialogs2)?

And i checked the hooking and all were done correctly.

Updated R5
- Added an additional check before calling OnDialogResponse for Prev Model dialogs. This may prevent crash.
Reply
#58

C:\Documents and Settings\Administrador\Escritorio\World of pawn\LEP Mysql\pawno\include\dialogs.inc(605) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Escritorio\World of pawn\LEP Mysql\pawno\include\dialogs.inc(652) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#59

Quote:
Originally Posted by LatinZ
Посмотреть сообщение
C:\Documents and Settings\Administrador\Escritorio\World of pawn\LEP Mysql\pawno\include\dialogs.inc(605) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Escritorio\World of pawn\LEP Mysql\pawno\include\dialogs.inc(652) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
I just compiled it once again and no warnings or errors.

You may show me your code.
Reply
#60

Lines of problem in the include:

return Dialog_OnPlayerClickTextDraw(playerid, _:clickedid);

return Dialog_OnPlayerClickPlayerTD(playerid, _layertextid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)