13.06.2016, 13:23
Quote:
Код:
forward updateStats(playerid); public updateStats(playerid) { new query[128], playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); mysql_format(mysql, query, sizeof(query), "SELECT `Money` FROM `accounts` WHERE `Name` = '%s' LIMIT 1", playername); mysql_query(mysql, query); if(cache_num_rows()) { Player[playerid][Money] = cache_get_field_content_int(0, "Money"); GivePlayerMoney(playerid, Player[playerid][Money]); SendClientMessage(playerid, -1, "Updated"); } return 1; } |
This also makes much more sense to me.
Thanks!