SA-MP Forums Archive
[Include] Dialogs include - Adding new styles to SAMP GUI - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Dialogs include - Adding new styles to SAMP GUI (/showthread.php?tid=570213)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


Re: Respuesta: Dialogs include - Adding new styles to SAMP GUI - Gammix - 02.12.2016

Quote:
Originally Posted by HidroDF
Посмотреть сообщение
Hello, I'm having a problem with the Model ID's. I'm using like this:

Код:
{"Milk", 19570},
For the Milk ModelID is showing me the id 1957 and not the 19570 it only gets 4 numbers not the five numbers.
Show how you put the arrays into ShowPlayerDialog/ShowPlayerPreviewModelDialog function argument.


Respuesta: Re: Respuesta: Dialogs include - Adding new styles to SAMP GUI - HidroDF - 02.12.2016

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Show how you put the arrays into ShowPlayerDialog/ShowPlayerPreviewModelDialog function argument.
Код:
enum    objsale
{
	Name[25],
	ObjectID
}

new Objects[][objsale] =
{
     {"Whiskey", 1520, 1},
     {"Milk", 19570, 1}
};

// OnDialogResponse

new list[800];
			for(new i; i < sizeof(Objects); ++i)
			{
			    format(list, sizeof(list), "%s%d\tID: %d\n", list, Objects[i][ObjectID], i);
		  	}
			ShowPlayerDialog(playerid, DIALOG_OBJ_SELECT, DIALOG_STYLE_PREVMODEL, "Avaliable", list, "Buy", "Return");



Re: Respuesta: Re: Respuesta: Dialogs include - Adding new styles to SAMP GUI - Gammix - 10.12.2016

Quote:
Originally Posted by HidroDF
Посмотреть сообщение
Код:
enum    objsale
{
	Name[25],
	ObjectID
}

new Objects[][objsale] =
{
     {"Whiskey", 1520, 1},
     {"Milk", 19570, 1}
};

// OnDialogResponse

new list[800];
			for(new i; i < sizeof(Objects); ++i)
			{
			    format(list, sizeof(list), "%s%d\tID: %d\n", list, Objects[i][ObjectID], i);
		  	}
			ShowPlayerDialog(playerid, DIALOG_OBJ_SELECT, DIALOG_STYLE_PREVMODEL, "Avaliable", list, "Buy", "Return");
If that only happens to milk object modelid, then this might be a bug related to SAMP itself.


Re: Dialogs include - Adding new styles to SAMP GUI - Dignity - 11.12.2016

Since it uses ShowPlayerDialog & OnDialogResponse, is it compatible with y_inline?


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 11.12.2016

Quote:
Originally Posted by Dignity
Посмотреть сообщение
Since it uses ShowPlayerDialog & OnDialogResponse, is it compatible with y_inline?
I guess, if you include it before y_inline it should work.


Re: Dialogs include - Adding new styles to SAMP GUI - Dignity - 11.12.2016

Quote:
Originally Posted by Gammix
Посмотреть сообщение
I guess, if you include it before y_inline it should work.
Alright, I'll give it a try and make a list of issues for you if there are any


Respuesta: Dialogs include - Adding new styles to SAMP GUI - lDarkeen - 05.02.2017

I've a problem here.

When I use DIALOG_STYLE_PREVMODEL_LIST, textdraw's model id doesn't show correctly.
For instance, if i use Cigarettes's id (19897), the dialog truncates the last letter and shows an object with id: 1989

Same Objects in both dialog:




DIALOG_STYLE_PREVMODEL_LIST
Код:
COMMAND:testanim(playerid, params[])
{
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PREVMODEL_LIST, "Selection", "2039\tItem1\n19565\tItem2\n19897\tItem3\n19998\tItem4", "OK", " ");
	return 1;
}

DIALOG_STYLE_PREVMODEL
Код:
COMMAND:testanim2(playerid, params[])
{
        new models[] = {2039, 19565, 19897, 19998};
	new labels[][] = {"Item1", "Item2", "Item3", "Item4"};

	ShowPlayerPreviewModelDialog(playerid, 0, DIALOG_STYLE_PREVMODEL, "Selection", models, labels, "Select", "Cancel");
	return 1;
}
Thanks in advanced.



EDIT:

FIX:
IN: stock Dialog_ShowToPlayer(playerid, dialogid, style, caption[], info[], button1[], button2[])
Search: for static str_model[5];
Replace with: static str_model[6];


Re: Dialogs include - Adding new styles to SAMP GUI - CantBeJohn - 06.02.2017

Do you still plan on doing the Global Textdraws version rather than PlayerTextDraws?


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 25.03.2017

Quote:
Originally Posted by Imbalo
Посмотреть сообщение
Why I can not click on anything?
Do your script use "OnPlayerClickPlayerTextDraw" or "OnPlayerClickTextDraw"?


Re: Dialogs include - Adding new styles to SAMP GUI - Imbalo - 25.03.2017

i used your example :
Код:
new SKINS[] =
{
	0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,
	50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,
	97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,
	132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,
	167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,
	202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,
	237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,
	272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299
};

CMD:skins(playerid) 
{
	static array[1][1];
    ShowPlayerPreviewModelDialog(playerid, 0, DIALOG_STYLE_PREVMODEL, "Skin selection dialog", SKINS, array, "Select", "Cancel");
    
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) 
{
	if (dialogid == 0) 
	{
	    if (response) 
	    	SetPlayerSkin(playerid, SKINS[listitem]); // SKINS[listitem]- returns you the skin id from the index we input as "listitemid"
	}
	
	return 1;
}
but without OnPlayerClickTextDraw


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 25.03.2017

i am asking if any of your other scripts uses "OnPlayerClickPlayerTextDraw" or "OnPlayerClickTextDraw"?


Re: Dialogs include - Adding new styles to SAMP GUI - Imbalo - 25.03.2017

i not used it


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 25.03.2017

Quote:
Originally Posted by Imbalo
Посмотреть сообщение
i not used it
Any one of your scripts is returning 1 under one of those callbacks or in a hook.


Re: Dialogs include - Adding new styles to SAMP GUI - Imbalo - 25.03.2017

So, what should I do now?


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 25.03.2017

Quote:
Originally Posted by Imbalo
Посмотреть сообщение
So, what should I do now?
Start looking what script is bugging this. Look at your includes which ever uses one of those callbacks and check if they are hooked and returns 0.


Re: Dialogs include - Adding new styles to SAMP GUI - Imbalo - 25.03.2017

Delete, sorry


Re: Dialogs include - Adding new styles to SAMP GUI - Imbalo - 25.03.2017

i can't find this Callback in my all include and all .pwn


Re: Dialogs include - Adding new styles to SAMP GUI - Sparkie - 29.03.2017

This used to work with easydialogs, it doesn't anymore?


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 29.03.2017

Quote:
Originally Posted by Sparkie
Посмотреть сообщение
This used to work with easydialogs, it doesn't anymore?
And it still works with every dialog related include which uses ShowPlayerDialog and/or OnDialogResponse. ONly thing you have to do is include this library before them.


Re: Dialogs include - Adding new styles to SAMP GUI - FinStar - 13.04.2017

Hi, i have problem with rotation object in DIALOG_STYLE_PREVMODEL

http://prntscr.com/ew067n

Код:
stock SearchName(id, item, slot)
{
	new sNazev[50];

	if(item == 157){ sNazev = "Kolo - Offroad"; }
	if(item == 158){ sNazev = "Kolo - Shadow"; }
	if(item == 159){ sNazev = "Kolo - Mega"; }
	if(item == 160){ sNazev = "Kolo - Rimshine"; }
	if(item == 161){ sNazev = "Kolo - Wires"; }
	if(item == 162){ sNazev = "Kolo - Classic"; }
	if(item == 163){ sNazev = "Kolo - Twist"; }
	if(item == 164){ sNazev = "Kolo - Cutter"; }
	if(item == 165){ sNazev = "Kolo - Switch"; }
	if(item == 166){ sNazev = "Kolo - Grove"; }
	if(item == 167){ sNazev = "Kolo - Import"; }
	if(item == 168){ sNazev = "Kolo - Dollar"; }
	if(item == 169){ sNazev = "Kolo - Trance"; }
	if(item == 170){ sNazev = "Kolo - Atomic"; }
	if(item == 171){ sNazev = "Kolo - Ahab"; }
	if(item == 172){ sNazev = "Kolo - Virtual"; }
	if(item == 173){ sNazev = "Kolo - Access"; }
        if(slot == 1){ strmid(Vozidlo[id][tuning_1_nazev], sNazev, 0, 50, 50); }
	return 1;
}
new const gAttachments[][e_ATTACHMENTS] =
{
	{1025, "Kolo~n~Offroad"},
	{1073, "Kolo~n~Shadow"},
	{1074, "Kolo~n~Mega"},
	{1075, "Kolo~n~Rimshine"},
	{1076, "Kolo~n~Wires"},
	{1077, "Kolo~n~Classic"},
	{1078, "Kolo~n~Twist"},
	{1079, "Kolo~n~Cutter"},
	{1080, "Kolo~n~Switch"},
	{1081, "Kolo~n~Grove"},
	{1082, "Kolo~n~Import"},
	{1083, "Kolo~n~Dollar"},
	{1084, "Kolo~n~Trance"},
	{1085, "Kolo~n~Atomic"},
	{1096, "Kolo~n~Ahab"},
	{1097, "Kolo~n~Virtual"},
	{1098, "Kolo~n~Access"}
};

                                switch(listitem)
				{
				    case 0:
				    {
				        TuningEditSlot[playerid] = 1;
						new k = GetPVarInt(playerid, "VehicleITuning");
				        if(Vozidlo[k][tuning_1_objectid] == 0)
						{
					        const
					    		size = sizeof(gAttachments)
							;
							new
							    models[size],
							    labels[size][25]
							;
							for (new x; x < size; x++)
							{
							    models[x] = gAttachments[x][attachModel];
							    strcat(labels[x], gAttachments[x][attachName]);
							}
							ShowPlayerPreviewModelDialog(playerid, DIALOG_TUNING_SEARCH, DIALOG_STYLE_PREVMODEL, "Vyber modelu:", models, labels, "Zvolit", "Zavrit");
							Dialog_SetModelRot(playerid, 157, .z = 35.0, .zoom = 1.3); // Wheel Offroad
							Dialog_SetModelRot(playerid, 158, .z = 35.0, .zoom = 1.3); 
							Dialog_SetModelRot(playerid, 159,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 160,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 161,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 162,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 163,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 164,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 165,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 166,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 167,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 168,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 169,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 170,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 171,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 172,  .z = 35.0, .zoom = 1.3);
							Dialog_SetModelRot(playerid, 173,  .z = 35.0, .zoom = 1.3);
						}
						else
						{
							ShowPlayerDialog(playerid, DIALOG_TUNING_EDIT, DIALOG_STYLE_LIST, "Tuning", "Upravit doplněk\nSmazat doplněk\nZměnit barvu doplňku", "Vybrat", "Zavřнt");
						}
				    }
				}
Wheel Offroad is correctly, but other tires have bad rotation position, why ? :/