08.09.2014, 15:54
(
Последний раз редактировалось TheRox; 08.09.2014 в 16:27.
Причина: Solved
)
Hello, i'm trying to create a simple CMD that shows how much money i have in the bank (table playerdata > field: money)
So this is the code
The problem is that it shows 1$ instead of 3000$
So this is the code
pawn Код:
CMD:checkbank(playerid, params[]){
new query[400];
new data[900];
format(query, sizeof(query), "SELECT `money` FROM playerdata WHERE user = '%s'", GetName(playerid));
mysql_query(query);
mysql_store_result();
new money[100];
new balance = mysql_fetch_row_format(money,"money");
format(data, sizeof(data), "Your balance is now: %d $", balance);
SendClientMessage(playerid, COLOR_YELLOW, data);
printf("DEBUG QUERY>> %s", query); // Ignore this
mysql_free_result();
return 1;
}