Stats saving
#4

You need to set "LoggedIn" to 1 when player logs in.

pawn Код:
stock LoginPlayer(playerid)
{
    new name[24];
    GetPlayerName(playerid,name,sizeof name);
    if(!udb_Exists(name)) return 0;
    SetPVarInt(playerid,"Deaths",dUserINT(name).("Deaths"));
    SetPVarInt(playerid,"Kills",dUserINT(name).("Kills"));
    SetPVarInt(playerid,"Money",dUserINT(name).("Money"));
    SetPVarInt(playerid,"Color",dUserINT(name).("Color"));
    SetPVarInt(playerid,"Level",dUserINT(name).("Level"));
    SetPVarInt(playerid,"LoggedIn",1); // <------ add this line
    return 1;
}
Reply


Messages In This Thread
Stats saving - by Dime - 23.09.2010, 08:45
Re: Stats saving - by Retardedwolf - 23.09.2010, 08:52
Re: Stats saving - by Dime - 23.09.2010, 09:11
Re: Stats saving - by MadeMan - 23.09.2010, 13:03

Forum Jump:


Users browsing this thread: 1 Guest(s)