Giving money with mysql query has no effect
#3

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Код:
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;
}
Aah, great!

This also makes much more sense to me.

Thanks!
Reply


Messages In This Thread
Giving money with mysql query has no effect - by bartje01 - 13.06.2016, 13:15
Re: Giving money with mysql query has no effect - by F1N4L - 13.06.2016, 13:18
Re: Giving money with mysql query has no effect - by bartje01 - 13.06.2016, 13:23
Re: Giving money with mysql query has no effect - by Konstantinos - 13.06.2016, 13:28
Re: Giving money with mysql query has no effect - by F1N4L - 13.06.2016, 13:32
Re: Giving money with mysql query has no effect - by Konstantinos - 13.06.2016, 13:36
Re: Giving money with mysql query has no effect - by bartje01 - 13.06.2016, 13:36

Forum Jump:


Users browsing this thread: 1 Guest(s)