Function only working for 1 player
#1

Hello everyone,

I don't know why, but my scripts are acting a little weird lately..
I have this problem, with my house system.
Actually, the problem is in loading a value from an ini file.

here is my loading code:
pawn Код:
GetPlayerName(playerid, pname, sizeof(pname));
    format(filee, sizeof(filee), "SavePos/%s.ini", pname);
    QuitHouseID[playerid] = dini_Int(filee,"QuitHouseID");
    new stringg[128];
    format(stringg,sizeof(stringg)," %d ",QuitHouseID[playerid]);
    SendClientMessageToAll(COLOR_RED,stringg);
I know this sounds impossible, but, when i am logged in as Jari Johnson, at playerid 0, it works fine, but when i am logged in as someone else, and still playerid 0, it doesn't work anymore.
When i switch back everything works again.

Is this a problem in the above code?
It is placed in OnPlayerConnect

I am working on this all night already(seriously), and i just can't figure it out..


Thanks in advance

PS. the sendclientmessage is for me to check what value was loaded, it returns 0 all the time
Reply
#2

Are you the only one with a file created? That is what it sounds like is the problem.
Reply
#3

No, a file is created for every player that disconnects,like, when i log into a new account, i disconnect 1 time to get the value saved, and then log in again to check if the value gets loaded.
when i check the file manually on my FTP, there is a value saved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)