10.03.2010, 11:42
Quote:
Originally Posted by Joe_
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; } GivePlayerCash is not the SA-MP Native way to give the player cash, try GivePlayerMoney? |
I have another dialog(login & register),and if I click cancel it Kick's me.
Here's my whole OnDialogResponse:
http://pastebin.com/hcUpAd7g