wtf. Level issue.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: wtf. Level issue.. (
/showthread.php?tid=97340)
wtf. Level issue.. -
_Vortex - 13.09.2009
Hey.. I have a huge issue.. If I have level 5, and i join my server, it sets my level to 0.. and I don't have ANYTHING in my script that would do that.. I have a huge headache, trying to fix this.. Idk what could be causing this.. Please help.
Re: wtf. Level issue.. -
dice7 - 13.09.2009
And how do you store your lvl 5 ?
Re: wtf. Level issue.. -
_Vortex - 13.09.2009
Quote:
Originally Posted by dice7
And how do you store your lvl 5 ?
|
In the playerfile Under "Level"
Re: wtf. Level issue.. -
dice7 - 13.09.2009
My guess is that you use an array with max_players and when you leave the server as playerid 0, the position 0 in the array will have 5 stored. Then another player will come as id 0 and he'll be lvl5, and when you'll come, you'll be id 1, but the array will have 0 stored in position 1
Re: wtf. Level issue.. -
_Vortex - 13.09.2009
Quote:
Originally Posted by dice7
My guess is that you use an array with max_players and when you leave the server as playerid 0, the position 0 in the array will have 5 stored. Then another player will come as id 0 and he'll be lvl5, and when you'll come, you'll be id 1, but the array will have 0 stored in position 1
|
there's 0 people on this server at all times, execpt me, I'm using this one for testing it.. It wasnt doing this before, and i didn't edit a thing..
Re: wtf. Level issue.. -
dice7 - 13.09.2009
Are you possibly restarting the server ? If not, then just use a storing system, e.g dini. It's simple
Re: wtf. Level issue.. -
_Vortex - 13.09.2009
Quote:
Originally Posted by dice7
Are you possibly restarting the server ? If not, then just use a storing system, e.g dini. It's simple
|
I'm using dini, and it stores their level fine, it did before, but when they connect it sets my level to 0 on the server (I can tell because I have that in the /stats command, and it wont let me do any admin commands) and if i alt tab and go into my playerfile it still has the level as 5, but since i have a level saving system, if i disconnect then it sets it to 0 in the playerfile. I can send you my gamemode (since the system is coded into there) since I trust you xD
Re: wtf. Level issue.. -
dice7 - 13.09.2009
Then show your OnPlayerDisconnect
Re: wtf. Level issue.. -
_Vortex - 13.09.2009
Quote:
Originally Posted by dice7
Then show your OnPlayerDisconnect
|
I know it has nothing to do with onplayerdisconnect because it happens when the player connects, but theres nothing under there that would do it.
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new pName[24], PlayerFile[50];
GetPlayerName(playerid, pName, sizeof(pName));
format(PlayerFile, sizeof(PlayerFile), "AdminScript/Users/%s.ini", pName);
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
dini_IntSet(PlayerFile, "LoggedIn", 0);
dini_IntSet(PlayerFile, "Money", GetPlayerMoney(playerid));
dini_IntSet(PlayerFile, "Level", pInfo[playerid][Level]);
return 1;
}
Re: wtf. Level issue.. -
coole210 - 13.09.2009
....