SA-MP Forums Archive
dialog menu problem 0.3c - 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: dialog menu problem 0.3c (/showthread.php?tid=204114)



dialog menu problem 0.3c - grovest26 - 28.12.2010

i dont know if im only one but i cant make dialog style menus work on 0.3c (RC7)
the first ''page'' of menu shows but when selecting something in menu it wont show it

classic ''CreateMenu'' works fine though.


Re: dialog menu problem 0.3c - gamer931215 - 28.12.2010

maybe its usefull to post the code as well ?
Maybe you made a little mistake in the script


Re: dialog menu problem 0.3c - Amaru - 29.12.2010

I have the same problem :/ When I choose something with tebeli it, nothing happens
Please help!


Re: dialog menu problem 0.3c - Amaru - 30.12.2010

For example, such a dialogue does not work... Please! Help!

Код:
new string1[256];
ShowPlayerDialog(playerid, 61, 1, "Wpisz ID biznesu", string1, "Dalej", "");



Re: dialog menu problem 0.3c - Biesmen - 30.12.2010

Код:
new string1[256];
ShowPlayerDialog(playerid, 61, 1, "Wpisz ID biznesu", string1, "Dalej", "");
DIALOG_STYLE_MSGBOX
DIALOG_STYLE_INPUT
DIALOG_STYLE_LIST

https://sampwiki.blast.hk/wiki/ShowPlayerDialog


Re: dialog menu problem 0.3c - SAMPGammer - 30.12.2010

LOL, de string needs to be text....
pawn Код:
string[265] = "_"
Try now.


Re: dialog menu problem 0.3c - Toreno - 30.12.2010

That will work for you.

On top of the GM / FS:
pawn Код:
new listitems[] = "1. Games\n2. Movies\n3. *******\n4. Cartoons"
On your command or where ever you need it:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "List dialog" ,listitems, "BUTTON1", "BUTTON2");



Re: dialog menu problem 0.3c - Amaru - 30.12.2010

Thank you very much for your help!


Re: dialog menu problem 0.3c - XePloiT - 30.12.2010

make sure you have the same return at the OnDialogResponse... in all the FSes and the GM


Re: dialog menu problem 0.3c - grovest26 - 03.01.2011

example this vehicle control script don't work

Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext,"/raisk",true)==0)
	{
		if(!IsPlayerInAnyVehicle(playerid))
		{
			SendClientMessage(playerid, 0xCC0000FF, "ERROR : You must be inside a vehicle to use this command.");
		}
		else
		{
			ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Control", "Lighting ( On/Off )\nBonnect ( Open/Close )\nBoot/Trunk ( Open/Close )\nDoors ( Open/Close )\nEngine ( On/Off )\nAlarm ( On/Off )", "Select", "Cancel");
		}
		return 1;
	}
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new veh = GetPlayerVehicleID(playerid);
	new engine,lights,alarm,doors,bonnet,boot,objective;
	if(dialogid == 1)
	{
		if(!response) return SendClientMessage(playerid, 0xCC0000FF, "INFORMATION : You clicked Cancel");
		switch(listitem)
	    {
	        case 0:
	        {
      			if(GetPVarInt(playerid, "Lights") == 0)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
					SetPVarInt(playerid, "Lights", 1);
				}
				else if(GetPVarInt(playerid, "Lights") == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
					SetPVarInt(playerid, "Lights", 0);
				}
			}
			case 1:
			{
				if(GetPVarInt(playerid, "Bonnet") == 0)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
					SetPVarInt(playerid, "Bonnet", 1);
				}
				else if(GetPVarInt(playerid, "Bonnet") == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
					SetPVarInt(playerid, "Bonnet", 0);
				}
			}
			case 2:
			{
				if(GetPVarInt(playerid, "Boot") == 0)
	 			{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
					SetPVarInt(playerid, "Boot", 1);
				}
				else if(GetPVarInt(playerid, "Boot") == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
					SetPVarInt(playerid, "Boot", 0);
				}
			}
			case 3:
			{
				if(GetPVarInt(playerid, "Doors") == 0)
	 			{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
					SetPVarInt(playerid, "Doors", 1);
				}
				else if(GetPVarInt(playerid, "Doors") == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
					SetPVarInt(playerid, "Doors", 0);
				}
			}
			case 4:
			{
				if(GetPVarInt(playerid, "Engine") == 0)
	 			{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
					SetPVarInt(playerid, "Engine", 1);
				}
				else if(GetPVarInt(playerid, "Engine") == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
					SetPVarInt(playerid, "Engine", 0);
				}
			}
			case 5:
			{
				if(GetPVarInt(playerid, "Alarm") == 0)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
					SetPVarInt(playerid, "Alarm", 1);
				}
				else if(GetPVarInt(playerid, "Alarm") == 1)
				{
					GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
					SetVehicleParamsEx(veh,engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
					SetPVarInt(playerid, "Alarm", 0);
				}
			}
		}
		return 1;
	}
	return 0;
}