Hey, i got a problem, i am using mysql on my server for saving levels, but it keeps reseting for some players and some not. When an admin changed the map, they were 4 players, 2 lost their levels, 1 kept them. 1 wasnt even playing and joined later and lost them. it isnt always like this, it is random.
Yes, yes, i have searched both google and the forum, cant find anything.
Mysql have been a pain in the ass for me, ive tried client_authorized, client_putinserver, spawn, etc. nothing seems to work safely. If you have something that is safe, feel free to share your method cause im out of ideas cause ive tried most things and dont know much about mysql, and ive heard that the mysql tutorial is faulty and wrong in many cases which seems true.
PHP Code:
public client_authorized(Id)
{
get_user_authid(Id, g_Steam[Id], charsmax(g_Steam[]))
set_task(5.0,"LoadShit",Id + TASK_SQL)
}
public LoadShit(Id)
{
Id-= TASK_SQL
Load_PlayerLevel(Id)
}
public client_disconnect(id)
{
Save_PlayerLevel(id)
}
public fw_Killed(id) {
if(is_user_connected(id))
Save_PlayerLevel(id)
}
Thanks for helping.
__________________