Hey, on my server the stats and levels are all saving into the database.
But its not loading them correctly.
I want it to set xp[id], kills[id] and level[id] to what is in the database.
I thought i did this right, but i guess not...
Code:
public client_putinserver(id)
{
new authid[32], query[265]
get_user_authid(id,authid,31)
format(query,255,"SELECT exp,level,kills FROM users WHERE steamid='%s'",authid)
if(dbi_nextrow(result) > 0)
{
xp[id] = dbi_field(result,1)
kills[id] = dbi_field(result,2)
level[id] = dbi_field(result,3)
dbi_free_result(result)
}
return PLUGIN_HANDLED
}