wtf. Level issue..
#1

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.
Reply
#2

And how do you store your lvl 5 ?
Reply
#3

Quote:
Originally Posted by dice7
And how do you store your lvl 5 ?
In the playerfile Under "Level"
Reply
#4

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
Reply
#5

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..
Reply
#6

Are you possibly restarting the server ? If not, then just use a storing system, e.g dini. It's simple
Reply
#7

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
Reply
#8

Then show your OnPlayerDisconnect
Reply
#9

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;
}
Reply
#10

....
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)