11.11.2013, 17:54
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:
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; }