[HELP]Damages Issue
#1

Код:
new fetch[256];
format(query, sizeof(query), "SELECT * FROM `damages` WHERE `pid` = '%s'", playerid);
cache_get_field_content(0, "area", fetch);
format(area, 79, "%s", fetch);
cache_get_field_content(0, "damage", fetch);
format(damage, 79, "%f", fetch);
cache_get_field_content(0, "weapon", fetch);
format(weapon, 79, "%s", fetch);
cache_get_field_content(0, "shooter", fetch);
format(shooter, 79, "%s", fetch);
mysql_function_query(dbHandle, query, false, "", "");
new gText[1000], fstr[45];
format(fstr, sizeof(fstr), "%d damage from %s to the %s\n", damage, weapon, area);
Код:
format(query, sizeof(query), "INSERT INTO `damages` (pid, area, damage, weapon, shooter) VALUES ('%d', '%s', '%f', '%s', '%s')",Target,GetBodyPartName(Target + 3),HealthLost,GetPlayerWeapon(Shooter),GetName(Shooter));
mysql_function_query(dbHandle, query, false, "", "");
Essentially what I aimed to do was to insert damages whenever the player lost health. Although that all works well, when selecting from the damages in order to display them, the display doesn't work.
Reply


Messages In This Thread
[HELP]Damages Issue - by XVlaDX - 24.07.2015, 15:19
Re: [HELP]Damages Issue - by xVIP3Rx - 24.07.2015, 15:30
Re: [HELP]Damages Issue - by Denying - 24.07.2015, 15:42
Re: [HELP]Damages Issue - by XVlaDX - 24.07.2015, 15:48
Re: [HELP]Damages Issue - by xVIP3Rx - 24.07.2015, 15:50
Re: [HELP]Damages Issue - by XVlaDX - 24.07.2015, 17:03
Re: [HELP]Damages Issue - by xVIP3Rx - 24.07.2015, 17:15
Re: [HELP]Damages Issue - by XVlaDX - 24.07.2015, 18:34
Re: [HELP]Damages Issue - by xVIP3Rx - 24.07.2015, 18:39
Re: [HELP]Damages Issue - by XVlaDX - 24.07.2015, 18:49

Forum Jump:


Users browsing this thread: 1 Guest(s)