08.07.2010, 13:35
(
Последний раз редактировалось Carlton; 08.07.2010 в 13:38.
Причина: Forgot to add your little cash note at the bottom.
)
I have no clue what you're doing in your MySQL query or whatever, I just re-wrote it for you, to save all the trouble. :}
pawn Код:
new
Escape[2][50],
Field[9],
mycash;
mysql_real_escape_strig(playername2, Escape[0]);
mysql_real_escape_strig(passnow, Escape[1]);
format(string1,sizeof(string1),"SELECT * FROM `users` WHERE `username` = '%s' AND `password` = '%s'",Escape[0], Escape[1]);
mysql_query(string1);
mysql_store_result();
if(mysql_retrieve_row()) {
mysql_get_field("cash", Field);
mycash = strval(Field);
}
mysql_free_result();
format(string, sizeof(string), "Cash Loaded, you have $ %s", mycash );
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerMoney(playerid,mycash );