Updating value from input box
#1

Hello. I want to update a cash on player's bank account - this value is in mysql. I have already make dialogs but my value doesn't update.

Code:

Код:
ShowPlayerDialog(playerid,706,DIALOG_STYLE_INPUT,"{ADCAB6}Truck Drive {F2E088}Toll","Wybierz kwotę doładowania","Doładuj","Anuluj");
tolladded[playerid] = strval(inputtext);
tollcash[playerid] = GetValue(playerid, "tollcash")+tolladded[playerid];
GivePlayerMoney(playerid,-tolladded[playerid]);
UpdateValue(playerid, "tollcash", tollcash[playerid]);
UpdateValue code

Код:
public UpdateValue(playerid, field[], value)
{
	new query[256];
	format(query, 256, "UPDATE `users` SET %s = %d WHERE `uid` = '%d';", field, value, uID[playerid]);
    mysql_query(query);
    mysql_free_result();
	return 1;
}
And how to make it's working?
Reply


Messages In This Thread
Updating value from input box - by DJGama101 - 17.09.2011, 18:50
Re: Updating value from input box - by =WoR=Varth - 17.09.2011, 18:58
Re: Updating value from input box - by [MWR]Blood - 17.09.2011, 19:06
Re: Updating value from input box - by DJGama101 - 18.09.2011, 08:29

Forum Jump:


Users browsing this thread: 1 Guest(s)