2021-04-11, 06:56 PM
oh, you have to put the variables itself into the query so you do:
Code:
GetPlayerPos(playerid, Player[playerid][X], Player[playerid][Y], Player[playerid][Z]);
// THIS
GetPlayerHealth(playerid, Player[playerid][Health]);
GetPlayerArmour(playerid, Player[playerid][Armour]);
format(Query,sizeof(Query),"UPDATE `USERS` SET TEAM = '%d', SKIN = '%d', MONEY = '%d', SCORE = '%d', HEALTH = '%f', ARMOUR = '%f', X = '%f', Y = '%f', Z = '%f' WHERE `NAME` = '%s' COLLATE NOCASE",
Player[playerid][Team],
Player[playerid][Skin],
GetPlayerMoney(playerid),//
GetPlayerScore(playerid),//
Player[playerid][Health],// AND THEN THIS
Player[playerid][Armour],// THIS TOO
Player[playerid][X],//
Player[playerid][Y],//
Player[playerid][Z],//
DB_Escape(name));
db_query(Database, Query);