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

at mos i have 3 items because i can own at most 3 items so i use it like this:
Code:
        Dialog_SetListitemPreviewRot(playerid, 0, 45.0, 5.0, 2.0, 10.0, cola1, colb1);
	Dialog_SetListitemPreviewRot(playerid, 1, 45.0, 5.0, 2.0, 1.0, cola2, colb2);
	Dialog_SetListitemPreviewRot(playerid, 2, 45.0, 5.0, 2.0, 1.0, cola3, colb3);
        ShowPlayerDialog(playerid, 6969, DIALOG_STYLE_PREVMODEL, "Vehicle's list", string, "Spawn", "Close");
All vehicle model ids are taken from database, they work fine in the string with dialog.like vehicle model ids cola's and colb's are taken in same query with model ids but still i see them on front with random colors. Not even a slight bit of rotation happens..
Reply

Quote:
Originally Posted by grymtn
View Post
at mos i have 3 items because i can own at most 3 items so i use it like this:
Code:
        Dialog_SetListitemPreviewRot(playerid, 0, 45.0, 5.0, 2.0, 10.0, cola1, colb1);
	Dialog_SetListitemPreviewRot(playerid, 1, 45.0, 5.0, 2.0, 1.0, cola2, colb2);
	Dialog_SetListitemPreviewRot(playerid, 2, 45.0, 5.0, 2.0, 1.0, cola3, colb3);
        ShowPlayerDialog(playerid, 6969, DIALOG_STYLE_PREVMODEL, "Vehicle's list", string, "Spawn", "Close");
All vehicle model ids are taken from database, they work fine in the string with dialog.like vehicle model ids cola's and colb's are taken in same query with model ids but still i see them on front with random colors. Not even a slight bit of rotation happens..
Yea i forgot to adjust rotation on smaller version of dialog(the small sized dialog). Its a simple quickfix, I'll do it when i am free.
Reply

Oh so thats a known bug haha. Good to know im not doing anything wrong. Thank you for your answer i will be waiting for it Keep up the good work.(Really amazing work!)
Reply

Quote:
Originally Posted by Gammix
View Post
Maybe you don't have a main in your script.
PHP Code:
main() {

Its one of the either problems i told you.
yeah, i have this
Reply

Looks great!
Reply

Quote:
Originally Posted by Locky_
View Post
Thank you! Now it works perfectly.


In the future, can we change the number of rows and columns?
Also change the position of the text, enable / disable rotation ... or even be able to zoom in or out instead of rotating.
I think they are good suggestions. :P

PS: I think the rotation buttons would look better and more discreet, close to the zoom value, and a bit smaller. If you lower it a little, and downsize them, it would look really good.



#edit
I made some changes (I added zoom in / out) and moved the rotation buttons lower.

Prints: https://imgur.com/a/RODHf
Source edited: https://pastebin.com/LVLuJ5if
@Gammix, I think this is a good suggestion to be on the main branch.
Reply

I don't find the Pawn Memory Plugin .so
Reply

I can clearly see a linux version zipped in the plugin's release page on github...
Reply

Having a lot of problems with the include and plugin on Linux, famous error 19 amx... (Include and Plugin doesn't match)
Reply

You have some version without the include memory?
Reply

Quote:
Originally Posted by Locky_
View Post
Thank you! Now it works perfectly.


In the future, can we change the number of rows and columns?
Also change the position of the text, enable / disable rotation ... or even be able to zoom in or out instead of rotating.
I think they are good suggestions. :P

PS: I think the rotation buttons would look better and more discreet, close to the zoom value, and a bit smaller. If you lower it a little, and downsize them, it would look really good.



#edit
I made some changes (I added zoom in / out) and moved the rotation buttons lower.

Prints: https://imgur.com/a/RODHf
Source edited: https://pastebin.com/LVLuJ5if
You could make a pull request on my github and i'll merge it after taking a look!
Reply

Another place for text would have been also good, Where I can show the price for things.
Reply

Quote:
Originally Posted by AroseKhanNiazi
View Post
Another place for text would have been also good, Where I can show the price for things.
You can use up the whole box for text with the help of gametext codes (~n~, etc).
Reply

I can not compile my gamemode when I put a included include. It just does not respond. No error or any warning, just does not stop for compilation. What happen?

Sry bad english.
Reply

They do not come out well, with the previous update it was perfect.

http://i1029.photobucket.com/albums/...psv630rjsx.png

PHP код:
new string[132], DBResult:qresultrows;
    
format(stringsizeof(string), "SELECT `NOMBRE`,`ID`,`VID`,`PRECIO` FROM `VDEPORT` WHERE `TIPO` = '1' ORDER BY (`ID` * 1) ASC limit 30");
    
qresult db_query(ZLDBstring);
    
rows db_num_rows(qresult);
    static 
Query[120], DBResult:Result;
    if(
rows)
    {
    new 
final_string[32 sizeof(string)];
    new 
Nombre[50], MiIDEstado[50];
    new 
PrecioLaIDVID;
    for(new 
0rows++)
    {
    
SetDialogPreviewRotation (playeridi, -16.00.0, -55.01.20);
    
db_get_field_assoc(qresult"NOMBRE"Nombresizeof(Nombre));
    
LaID db_get_field_assoc_int(qresult"ID");
    
VID db_get_field_assoc_int(qresult"VID");
    
Precio db_get_field_assoc_int(qresult"PRECIO");
    
JugadorDato[playerid][zConteoPrecio][i] = Precio;
       
format(Querysizeof(Query), "SELECT `ID` FROM `VCOM` WHERE `NUMITEM` = '%d' AND `TIPO` = '1' AND `ID` = '%d' COLLATE NOCASE"LaIDJugadorInfo[playerid][zMiID]);
       
Result db_query(ZLDBQuery);
       if(
db_num_rows(Result)) MiID db_get_field_assoc_int(qresult"ID");
       
JugadorDato[playerid][zConteoID][i] = MiID;
       
JugadorDato[playerid][zVID][i] = VID;
       
format(Estado,sizeof(Estado),LaID != MiID ? ( "~y~%d G" )     : ( "~b~Usar" ),Precio);
    
db_free_result(Result);
    
format(stringsizeof(string), "%i\t%s~n~~n~~n~~n~%s\n"VIDNombreEstado);
    
strcat(final_stringstring);
    
db_next_row(qresult);
    }
    
ShowPlayerDialog(playerid,DIALOG_MAUTOS+1DIALOG_STYLE_PREVIEW_MODEL"Deportivos"final_string"Seleccionar""Atrбs");
    
PlayerPlaySound(playerid11390.00.00.0);
    }
    
db_free_result(qresult); 
Reply

Quote:

They do not come out well, with the previous update it was perfect.

What do you mean? What's the bug if there's any?
Reply

I think he means the arrows that appear on the image of the car.
Reply

Quote:
Originally Posted by Gammix
Посмотреть сообщение
What do you mean? What's the bug if there's any?

labels go wrong, do not appear or come out with repeated letters
Reply

Quote:
Originally Posted by dannypanda05
Посмотреть сообщение
labels go wrong, do not appear or come out with repeated letters
Ok you can try using ShowPreviewModelDialog instead (there's an example in main post about how to use it).
Let me know if the bug still appears with it or not.
Reply

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Ok you can try using ShowPreviewModelDialog instead (there's an example in main post about how to use it).
Let me know if the bug still appears with it or not.
PHP код:
new string[132], DBResult:qresultrows;
    
format(stringsizeof(string), "SELECT `NOMBRE`,`ID`,`VID`,`PRECIO` FROM `VDEPORT` WHERE `TIPO` = '1' ORDER BY (`ID` * 1) ASC limit 30");
    
qresult db_query(ZLDBstring);
    
rows db_num_rows(qresult);
    static 
Query[120], DBResult:Result;
    if(
rows)
    {
    new 
final_string[32 sizeof(string)];
    new 
Nombre[50], MiIDEstado[50];
    new 
PrecioLaIDVID;
    for(new 
0rows++)
    {
    
SetDialogPreviewRotation (playeridi, -16.00.0, -55.01.20);
    
db_get_field_assoc(qresult"NOMBRE"Nombresizeof(Nombre));
    
LaID db_get_field_assoc_int(qresult"ID");
    
VID db_get_field_assoc_int(qresult"VID");
    
Precio db_get_field_assoc_int(qresult"PRECIO");
    
JugadorDato[playerid][zConteoPrecio][i] = Precio;
       
format(Querysizeof(Query), "SELECT `ID` FROM `VCOM` WHERE `NUMITEM` = '%d' AND `TIPO` = '1' AND `ID` = '%d' COLLATE NOCASE"LaIDJugadorInfo[playerid][zMiID]);
       
Result db_query(ZLDBQuery);
       if(
db_num_rows(Result)) MiID db_get_field_assoc_int(qresult"ID");
       
JugadorDato[playerid][zConteoID][i] = MiID;
       
JugadorDato[playerid][zVID][i] = VID;
       
format(Estado,sizeof(Estado),LaID != MiID ? ( "~y~%d G" )     : ( "~b~Usar" ),Precio);
    
db_free_result(Result);
    
format(stringsizeof(string), "%s~n~~n~~n~~n~%s\n"NombreEstado);
    
strcat(final_stringstring);
    
db_next_row(qresult);
    }
    
ShowPreviewModelDialog(playeridDIALOG_MAUTOS+1"Deportivos"VIDfinal_string"Seleccionar""Atrбs"20); 
It marks me wrong, how would I use it?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)