10.03.2010, 11:36
If it works, then good, if not:
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.
Код:
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?
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.