0.3 menu
#1

i wanted to make a nice menu, but now it wont work.

Код:
if (strcmp("/wmenu", cmdtext, true, 10) == 0)
{
	ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "menu", "Enter\nBuy Points\nInformation", "Select", "Exit");// first i do select on the "Buy Points"
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new Quantity = strval(inputtext);
	new CurrMoney = GetPlayerMoney(playerid);
	gCheckout[playerid]= Quantity*Cost;
	
	if(dialogid == DIALOGID)
	{
		if(response)
		{
			if(listitem == 0) 	
			{
				SendClientMessage(playerid,COLOR_BLUE,"some message here");
			}				
			if(listitem == 1) 			{
				ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_INPUT, "Points", "", "Select", "Cancel");// then i put a number in the inputbox and do "select"
			}

		}
		return 1;
	}

	if(dialogid == DIALOGID+1)
	{
	new s[128];
	format(s,sizeof(s),"Points: %i\n\nCost: %i$",Quantity,gCheckout[playerid]);
	ShowPlayerDialog(playerid, DIALOGID+3,0,"lolzzzz",s,"Buy","Cancel");                //then i do buy
	}
	else if(dialogid == DIALOGID+3 && CurrMoney >= gCheckout[playerid]) 
	{
  new PointsStringbought[128];
	format(PointsStringbought,sizeof(PointsStringbought),"You have bought %i Points for $%i",PointsQuantity,gCheckout[playerid]);
	GivePlayerMoney(playerid,-gCheckout[playerid]);
 	return 1;
  }
  else if(dialogid == DIALOGID+3 && CurrMoney <= gCheckout[playerid])
  {
	  SendClientMessage(playerid,COLOR_BLUE,"You do not have enough money.");
		return 1;
	 	}
	return 0;
 }
It will go to DIALOG+3 with the BUY button, but it wont get any money off, or send me messages. how can i fix this?
Reply


Messages In This Thread
0.3 menu - by thuron - 26.10.2009, 21:10
Re: 0.3 menu - by thuron - 27.10.2009, 09:10
Re: 0.3 menu - by SiJ - 27.10.2009, 12:16
Re: 0.3 menu - by thuron - 27.10.2009, 16:30
Re: 0.3 menu - by thuron - 27.10.2009, 17:03
Re: 0.3 menu - by Joe Staff - 27.10.2009, 18:09
Re: 0.3 menu - by Daren_Jacobson - 27.10.2009, 18:46
Re: 0.3 menu - by thuron - 27.10.2009, 18:52
Re: 0.3 menu - by thuron - 27.10.2009, 19:11
Re: 0.3 menu - by Daren_Jacobson - 27.10.2009, 19:13

Forum Jump:


Users browsing this thread: 4 Guest(s)