Converting?
#4

You do not need to call the query in the command itself. Just create a SaveStats function, and then set their level variable to the new variable, and call the SaveStats function itself.

Ex. PInfo[playerid][ALevel] = level; SaveStats(playerid);

Took the liberty of creating a simple SaveStats function using MySQL R7:
Код:
forward SendQuery();
public SendQuery() return 1;

stock SaveStats(playerid)
{
        new query[90];
	format(query,sizeof(query),"UPDATE `Accounts` SET `ALevel` = '%i' WHERE `Username` = '%s'",
	PInfo[playerid][ALevel],
	GetName(playerid));
	mysql_function_query(MySQL, query, false, "SendQuery", "");
	return 1;
}
Reply


Messages In This Thread
Converting? - by logoster - 11.11.2013, 16:35
Re: Converting? - by Konstantinos - 11.11.2013, 17:02
Re: Converting? - by logoster - 11.11.2013, 17:22
Re: Converting? - by Camacorn - 11.11.2013, 17:54

Forum Jump:


Users browsing this thread: 1 Guest(s)