Script question
#1

Hey,

I have a houseupgrade command, but when I do it in game it does not work.

Код:
	}
	if(strcmp(cmd, "/houseupgrade", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pHouseAccepted] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You don't own a house!");
	            return 1;
	        }
		    else
		    {
			    ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYLE_LIST,string,"House Interior Upgrade\nHouse Car Upgrade\nHouse Nametag Upgrade\nHouse Miscellaneous Upgrade","Proceed","Cancel");
			    return 1;
			}
		}
	 	return 1;
	}
That is my code, could someone please tell me why it does not work.
Reply
#2

ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYL E_LIST,string,"House Interior Upgrade\nHouse Car Upgrade\nHouse Nametag Upgrade\nHouse Miscellaneous Upgrade","Proceed","Cancel");

1. What is the string?
2. Can you post the code under the callback OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

Also this is the wrong section, next time post in the Script Discussion forum.
Reply
#3

Код:
}
	if(dialogid == UPGRADEMENU1) //UpgradeHouse main menu
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	            {
                    DisplayDialogForPlayer(playerid, 59);
	            }
	            case 1:
	            {
	                ShowPlayerDialog(playerid,UPGRADEMENU3,DIALOG_STYLE_LIST,"Car Upgrade","Clover		$40,000\nMower		$12,000\nTractor		$20,000\nFaggio		$15000\nWayfarer	$20,000\nBF-400		$55000\nFreeway	$45,000\nQuad		$40,000\nSentinel	$45,000\nStretch		$50,000\nVoodoo		$45,000\nTaxi		$45,000\nCabbie		$40,000\nPremier	$46,000\nWashington	$55000\nBuffalo		$50,000\nBanshee	$900,000\nHotknife	$13,0000\nRomero	$38,000\nAdmiral		$39000\nNext","Proceed","Cancel");
	            }
	            case 2:
	            {
	                ShowPlayerDialog(playerid,UPGRADEMENU5,DIALOG_STYLE_INPUT,"Nametag Upgrade","You can adjust the nametag of your house depending on what you want to roleplay\nhere are some nametag examples: House, Shack, Apartment, Mansion.","Confirm","Cancel");
	            }
	            case 3:
	            {
	                ShowPlayerDialog(playerid,UPGRADEMENU6,DIALOG_STYLE_LIST,"Miscellaneous Upgrade","Alarm System		$50,000\nNitrous Oxide (2x)	$10,000\nNitrous Oxide (6x)	$25,000\nCustom License Plate	$35,000\nVehicle Lock		$15,000","Proceed","Cancel");
	            }
	        }
			return 1;
		}
	}
Where do I find the string? I am not super advanced in scripting and dont know all the terms I just edit.
Reply
#4

K that looks fine... unless those dialogs arnt working...

Okay so for the first dialog replace string with "House Upgrades" and your script may work.

Since string doesn't appear to be anything...
Reply
#5

Can you show me when I change
Код:
ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYLE_LIST,string
into
Код:
ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYLE_LIST,HouseUpgrades
or
Код:
ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYLE_LIST,House Upgrades
It does not compiles properly.
Reply
#6

The code you posted in OP doesn't do anything except send messages...
Reply
#7

ShowPlayerDialog(playerid,UPGRADEMENU1,DIALOG_STYL E_LIST,"House Upgrades","House Interior Upgrade\nHouse Car Upgrade\nHouse Nametag Upgrade\nHouse Miscellaneous Upgrade","Proceed","Cancel");

Note: On this forum for some reason it added an unneeded space between the L and the E in DIALOG_STYLE_LIST, you may want to fix that after copy&pasting.

@GrimR What?
Reply
#8

Referring to orignal post by original poster, it's obvious it doesn't actually do much lol.
Reply
#9

@GrimR Actually it is acting like a directory, it gives the players options to choose from to be more organized instead of having one big list...
Reply
#10

Its like an SIUMENU for a diolog to change clothes this one just allows you to pick waht catagory you wwant whether it be vehicles, misc ect.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)