08.07.2010, 13:29
I'm trying the same, i have this but is still doesn't work.
i want to get the money from the database and use it as player money. but it. in the mysql log it gives the right result but when i want to free that result it prints the query.
Код:
new string1[256]; new result1; format(string1,sizeof(string1),"SELECT `cash` FROM `users` WHERE `username` = '%s' AND `password` = '%s'",playername2, passnow); result1 = mysql_query(string1); new stores; stores = mysql_store_result(result1); new cash; new Field[64]; ammount = mysql_fetch_row_format(Field, "|", stores); cash = mysql_free_result(); format(string, sizeof(string), "Cash Loaded, you have $ %s", cash); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); GivePlayerMoney(playerid,cash);