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

Im having a problem with DIALOG_STYLE_PREVIEW_MODEL , when i exit of menu of dialog , the arrow point dont desapiar , if i click on purshase or cancel , or on object , dont desapiar the arrow point , i try put CancelSelectTextDraw(playerid); , but i cant remove this bug



When i try exit for this menu , dont desapiar the arrow point

Reply

Quote:
Originally Posted by Awakend
Посмотреть сообщение
Im having a problem with DIALOG_STYLE_PREVIEW_MODEL , when i exit of menu of dialog , the arrow point dont desapiar , if i click on purshase or cancel , or on object , dont desapiar the arrow point , i try put CancelSelectTextDraw(playerid); , but i cant remove this bug



When i try exit for this menu , dont desapiar the arrow point

What happens when you press ESC while the dialog is open?
Reply

Is there a limit to display? I have an array of 215 objects and displays only 7 pages. I didn't change anything in the code.

PHP код:
stock ShowItems(playerid){
    static 
string[sizeof(Items) * 128];
    if (
string[0] == EOS){ 
        for(new 
isizeof(Items); i++){ 
            
format(stringsizeof(string), "%s%i(0.0, 0.0, -50.0, 1.5)\t%s~n~~g~~h~$%i\n"stringItems[i][itemid], Items[i][name], Items[i][price]); 
        } 
    } 
    return 
ShowDialog(playerid644DIALOG_STYLE_PREVIEW_MODEL"Items"string"Select""Close"); 

Reply

When i clicking to rotating object, 5-6 clicks, then objects changes to another random object, wtf? How i can fix this?
Sorry for my bad english. I am not alone on server.
Reply

Quote:
Originally Posted by CherryMond
Посмотреть сообщение
Is there a limit to display? I have an array of 215 objects and displays only 7 pages. I didn't change anything in the code.

PHP код:
stock ShowItems(playerid){
    static 
string[sizeof(Items) * 128];
    if (
string[0] == EOS){ 
        for(new 
isizeof(Items); i++){ 
            
format(stringsizeof(string), "%s%i(0.0, 0.0, -50.0, 1.5)\t%s~n~~g~~h~$%i\n"stringItems[i][itemid], Items[i][name], Items[i][price]); 
        } 
    } 
    return 
ShowDialog(playerid644DIALOG_STYLE_PREVIEW_MODEL"Items"string"Select""Close"); 

Okay... my string have more than 4096 chars... How to solve this?
Reply

C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(680) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(681) : error 017: undefined symbol "MEM_get_size"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(703) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(704) : error 017: undefined symbol "MEM_delete"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(707) : error 017: undefined symbol "MEM_delete"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(710) : error 017: undefined symbol "MEM_delete"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(712) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(712) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(906) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(906) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(925) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1190) : error 017: undefined symbol "MEM_new"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1190) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1210) : error 017: undefined symbol "MEM_new"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1210) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1211) : error 017: undefined symbol "MEM_new_arr"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1211) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1222) : error 017: undefined symbol "MEM_get_size"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1223) : error 017: undefined symbol "MEM_new"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1223) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1226) : error 017: undefined symbol "MEM_delete"
Reply

C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(680) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(681) : error 017: undefined symbol "MEM_get_size"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(703) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(704) : error 017: undefined symbol "MEM_delete"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(707) : error 017: undefined symbol "MEM_delete"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(710) : error 017: undefined symbol "MEM_delete"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(712) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(712) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(906) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(906) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(925) : error 017: undefined symbol "MEM_NULLPTR"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1190) : error 017: undefined symbol "MEM_new"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1190) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1210) : error 017: undefined symbol "MEM_new"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1210) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1211) : error 017: undefined symbol "MEM_new_arr"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1211) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1222) : error 017: undefined symbol "MEM_get_size"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1223) : error 017: undefined symbol "MEM_new"
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1223) : warning 213: tag mismatch
C:\Users\User\Desktop\GAMEMODES\lrp\pawno\include\ newdialogstyle.inc(1226) : error 017: undefined symbol "MEM_delete"
Reply

Quote:
Originally Posted by CherryMond
Посмотреть сообщение
Okay... my string have more than 4096 chars... How to solve this?
Use strcat and format both for longer strings.

@value18: I'll have to take a look at the code, but it never happened to anyone before. I'll let you know if its code issue or something else.
Reply

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Use strcat and format both for longer strings.

@value18: I'll have to take a look at the code, but it never happened to anyone before. I'll let you know if its code issue or something else.
Код:
new string[256];
	
	for(new i; i < sizeof(original_skins); i++) {
        format(string, sizeof string, "%s%i\tID: %i\n", string, original_skins[i], original_skins[i]);
    }
    
    ShowPlayerDialog(playerid, CUSTOM_OS_MENU, DIALOG_STYLE_PREVIEW_MODEL, "Select original skin", string, "Select", "Cancel");
My code is so simple. When i am alone on the server, no problems. When people playing with me and using this menu functions - bug happens. I have 5 menus using your include.
Reply

hi , i have a problem , when i want to use this with for exp /selectskin command , it will show and desapear ! i have this problem with mSelection inc too , in fact it look the dialog will not respond and then the textdraws will remove i didnt have this problem before and its look like its apear when i add / edit some codes can you help me , when i may edit that is related to responde of dialogs ? (im pretty sure its about the respond , i write a code on OnDialogResponse so if the dialog responde set the player skin and if not send this mssg: Skin Select Cancelled and this mssg will show !)
Reply

and i have another problem that is the items will show a little small is there anyway to change their size ?
Reply

guyz i really need your help in this case hlp me plz
Reply

i dont know what did i do its effects even on OnPlayerEditAttachedObject its some how not response in this cases (its look like you pressed ESC button!) wth i should do i dont know where did i created this bug
Reply

Hi, the include is great but I need a favor.
I need more objects to be shown, they are currently showing 2x6 but I want to do it 4x8, what things should I change? because it complicates me with the TextDrawBox and the positions of the TextDraw since they are misplaced.

Sorry for my English.
Reply

how to fix this?? im running on 0.3.dl
Код:
SA-MP Dedicated Server
----------------------
v0.3.DL-R1, ©2005-2018 SA-MP Team

[15:27:40] sleep = 5  (int)
[15:27:40] 
[15:27:40] Server Plugins
[15:27:40] --------------
[15:27:40]  Loading plugin: audio
[15:27:40] 

*** Audio Plugin v0.5 by Incognito loaded ***

[15:27:40]   Loaded.
[15:27:40]  Loading plugin: sscanf
[15:27:40] 

[15:27:40]  ===============================

[15:27:40]       sscanf plugin loaded.     

[15:27:40]          Version:  2.8.3        

[15:27:40]   © 2018 Alex "******" Cole  

[15:27:40]  ===============================

[15:27:40]   Loaded.
[15:27:40]  Loading plugin: streamer
[15:27:40] 

*** Streamer Plugin v2.9.4 by Incognito loaded ***

[15:27:40]   Loaded.
[15:27:40]  Loading plugin: Whirlpool
[15:27:40]  
[15:27:40]  ==================
[15:27:40]  
[15:27:40]   Whirlpool loaded
[15:27:40]  
[15:27:40]  ==================
[15:27:40]  
[15:27:40]   Loaded.
[15:27:40]  Loading plugin: FileFunctions
[15:27:40]   Loaded.
[15:27:40]  Loading plugin: memory
[15:27:40] ========================
[15:27:40] = Memory access plugin =
[15:27:40] =       Made by BigETI =
[15:27:40] = Loaded!              =
[15:27:40] ========================
[15:27:40]   Loaded.
[15:27:40]  Loading plugin: nativechecker
[15:27:40]   Loaded.
[15:27:40]  Loaded 7 plugins.

[15:27:41] 
[15:27:41] Filterscripts
[15:27:41] ---------------
[15:27:41]   Loading filterscript 'anims.amx'...
[15:27:41]   Loading filterscript 'yom_buttons.amx'...
[15:27:41]   Loading filterscript 'zmapping.amx'...
[15:27:41]   Loading filterscript 'antiddos.amx'...
[15:27:41]   Loaded 4 filterscripts.

[15:27:41]    Error: Function not registered: 'MEM_get_size'
[15:27:41]    Error: Function not registered: 'MEM_delete'
[15:27:41]    Error: Function not registered: 'MEM_new'
[15:27:41]    Error: Function not registered: 'MEM_new_arr'
[15:27:41] Script[gamemodes/Pl-RP.amx]: Run time error 19: "File or function is not found"
[15:27:41] Number of vehicle models: 1
Reply

Update Memory plugin
Reply

Quote:
Originally Posted by Kasichok
Посмотреть сообщение
I updated it but I got that error
Reply

Any way you can load a list from a file(like mSelection)? Can someone give me an example?
Reply

Quote:
Originally Posted by kazaka
View Post


Bug
Not really, it's your gamemode's or other code interfering with textdraw ids.

Quote:
Originally Posted by Stefhan
View Post
Hi Agneese, do you have a version that works with YSI 5? YSI 5 requires you to make all strings constant.
I tried to do it myself, but it broke the whole include. Dialogs don't show anymore.

Before:

Code:
static Prev_CreatePlayerTextDraws(playerid, header[], button1[], button2[], button3[], totalItems)

stock Prev_ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
After:

Code:
static Prev_CreatePlayerTextDraws(playerid, const header[], const button1[], const button2[], const button3[], totalItems)

stock Prev_ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[])
There's no errors (after changing it to const) but the dialogs still don't work. It just shows me the dialog type of the previous dialog I had open (msg box, list etc.) instead of the special type.

Edit: The cause seems to be that they removed the DIALOG_PREVIEW parameter in YSI 5. A workaround would be to use the default showplayerdialog, which sucks. I hope you can fix this somehow.
I can't fix it, its sounds like a YSI problem. Maybe try including PreviewModelDialog.inc before including YSI.


Quote:
Originally Posted by Dice_
View Post
Any way you can load a list from a file(like mSelection)? Can someone give me an example?
Use file functions and create a string for the dialog (the syntax is given in thread). Read line by line and use scanf to parse values, create a string and strcat the dialog syntax onto it.
Reply

Quote:
Originally Posted by Gammix
View Post
Not really, it's your gamemode's or other code interfering with textdraw ids.


I can't fix it, its sounds like a YSI problem. Maybe try including PreviewModelDialog.inc before including YSI.



Use file functions and create a string for the dialog (the syntax is given in thread). Read line by line and use scanf to parse values, create a string and strcat the dialog syntax onto it.
Tried this and get the following error: (I also moved the memory include above y_dialog and previewmodel.)

Code:
[debug] Run time error 19: "File or function is not found"
[debug]  Prev_ShowPlayerDialog
[debug] Run time error 19: "File or function is not found"
[debug]  Prev_ShowPlayerDialog
Script[gamemodes/server.amx]: Run time error 19: "File or function is not found"
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)