20.03.2014, 07:04
Hello all i have litle problem.everything works fine but except player cord saving i have set them to floats in script and db but with no resuts.
my enum
of corse saving query
my enum
Code:
enum PlayerInfo { ID, Nick[24], pAdmin, pMoney, pKills, pDeaths, pScore, IP[16], Float:pLastX, Float:pLastY, Float:pLastZ, pInt, pSkin, Logged, IsRegistered };
Code:
SavePlayer(playerid) { if(pInfo[playerid][Logged] == 1) { new Query[500]; new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); format(Query, 500, "UPDATE `playerdata` SET `admin` = '%d', `score` = '%d', `money` = '%d', `kills` = '%d', `deaths` = '%d',`x` = '%f',`y` = '%f',`z` = '%f',`pInt` = '%d',`pskin` = '%d' WHERE `id` = '%d' LIMIT 1", pInfo[playerid][pAdmin], pInfo[playerid][pScore], pInfo[playerid][pMoney], pInfo[playerid][pKills], pInfo[playerid][pDeaths], pInfo[playerid][pLastX], pInfo[playerid][pLastY], pInfo[playerid][pLastZ], pInfo[playerid][pInt], pInfo[playerid][pSkin], pInfo[playerid][ID]); mysql_query(Query); } }