Gui menu problem.
#6

If it works, then good, if not:

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(response && dialogid == 90000)
	{
 		if(strlen(inputtext))
   	{
      new v;
      v = strval(inputtext);
      if(v <= PlayerInfo[playerid][pAccount])
      {
	      ConsumingMoney[playerid] = 1;
	      GivePlayerCash(playerid, v);
	      PlayerInfo[playerid][pAccount] = PlayerInfo[playerid][pAccount] - v;
	      return 1;
      }
      else { SendClientMessage(playerid, color, "You don't have that money in your account"); }
  		}
		SendClientMessage(playerid, color, "Whatever"); // If the player doesn't put anything in the box return this message
	}
	return 1;
}
Forums ruin the indentation, sorry

GivePlayerCash is not the SA-MP Native way to give the player cash, try GivePlayerMoney?

If you're using the server-sided money from other scripts, make sure that the script works, but you could try GivePlayerMoney, if that works, then try GivePlayerCash, if that doesn't work, then it's the GivePlayerCash function, if GivePlayerMoney doesn't work, tell me.
Reply


Messages In This Thread
Gui menu problem. - by Razvann - 09.03.2010, 12:56
Re: Gui menu problem. - by Razvann - 10.03.2010, 10:45
Re: Gui menu problem. - by Joe_ - 10.03.2010, 11:17
Re: Gui menu problem. - by Deat_Itself - 10.03.2010, 11:21
Re: Gui menu problem. - by Razvann - 10.03.2010, 11:26
Re: Gui menu problem. - by Joe_ - 10.03.2010, 11:36
Re: Gui menu problem. - by Razvann - 10.03.2010, 11:42
Re: Gui menu problem. - by Joe_ - 10.03.2010, 11:45
Re: Gui menu problem. - by Razvann - 10.03.2010, 11:46
Re: Gui menu problem. - by Joe_ - 10.03.2010, 11:57

Forum Jump:


Users browsing this thread: 1 Guest(s)