Problem saving playerdata
#1

Hey guys,

I got a problem with saving playerdata into an .ini

When some-one logs out (disconnect), then im getthing this:

Код:
Name=Alusion[NL]
Ip=255.255.255.255 // <-- should be 127.0.0.1
Registered=0 // <-- should be 1
Password=313656198
Level=0
Money=500
Score=0
Vip=0
What to do to get the ip right?

pawn Код:
public OnPlayerDisconnect(playerid, reason)
    {

        new file[200], name[MAX_PLAYER_NAME], ip[16];
        GetPlayerIp(playerid, ip, sizeof(ip));
        GetPlayerName(playerid, name, sizeof(name));
        format(file, sizeof(file), PlayerFile, name);
        dini_Set(file, "Name", name);
        dini_Set(file, "Ip", ip);
        dini_IntSet(file, "Registered", gPlayerInfo[playerid][PLAYER_REGGED]);
        dini_IntSet(file, "Password", gPlayerInfo[playerid][PLAYER_PASS]);
        dini_IntSet(file, "Level", gPlayerInfo[playerid][PLAYER_LEVEL]);
        dini_IntSet(file, "Vip", gPlayerInfo[playerid][PLAYER_VIP]);
        dini_IntSet(file, "Money", GetPlayerMoney(playerid));
        dini_IntSet(file, "Score", GetPlayerScore(playerid));
        gPlayerLogged[playerid] = 0;
        return 1;
    }
Reply


Messages In This Thread
Problem saving playerdata - by Wesley221 - 30.05.2011, 13:50
AW: Problem saving playerdata - by Julian12345 - 30.05.2011, 14:35
Re: Problem saving playerdata - by Wesley221 - 30.05.2011, 15:33
AW: Problem saving playerdata - by Julian12345 - 30.05.2011, 16:09
Re: Problem saving playerdata - by Wesley221 - 30.05.2011, 18:17
Re: Problem saving playerdata - by Georgelopez1 - 30.05.2011, 18:23
Re: Problem saving playerdata - by Wesley221 - 31.05.2011, 08:09

Forum Jump:


Users browsing this thread: 1 Guest(s)