24.12.2009, 09:12
Hello,
Today i have made a jobsystem that save the players job after relog. The system save your job, but after relog it don't load the job. I don't now whats the problem. Here you have a little piece of my login-script that (if everything works correctly ) will load your job:
Have I made a mistake in this section?
Happy Christmas!
sean5874
PS: The script that save the jobs and the script that load the job are not the same!
Today i have made a jobsystem that save the players job after relog. The system save your job, but after relog it don't load the job. I don't now whats the problem. Here you have a little piece of my login-script that (if everything works correctly ) will load your job:
Код:
logged[playerid] = 1; money[playerid] = dini_Int(udb_encode(playername), "money"); adminlevel[playerid] = dini_Int(udb_encode(playername), "adminlevel"); job[playerid] = dini_Int(udb_encode(playername), "job"); format(string, sizeof(string), "%s, je bent nu ingelogd. Je hebt adminlevel %d en je hebt %d dollar", playername, adminlevel[playerid], money[playerid]); SendClientMessage(playerid, COLOR_GREEN, string); GivePlayerMoney(playerid, money[playerid]); SetPlayerTeam(playerid, job[playerid]); } }
Happy Christmas!
sean5874
PS: The script that save the jobs and the script that load the job are not the same!