lil question
#9

thanks for everything but i have problem with saving it on connect,
on top
pawn Code:
enum pData
{
    AdminLevel,
    Cash,
    Score,
    vip,
    Hour,
    Minute
};
new PlayerData[MAX_PLAYERS][pData];
on player connect
pawn Code:
SetTimerEx("Hours",3600000, 1, "i", playerid);
    SetTimerEx("Minutes", 60*1000, 1, "i", playerid);
OnPlayerDisconnect
pawn Code:
dini_IntSet(file, "Hours",PlayerData[playerid][Hour]);
        dini_IntSet(file, "Minutes",PlayerData[playerid][Minute]);
When player registers
pawn Code:
dini_IntSet(file, "Hours",PlayerData[playerid][Hour]);
            dini_IntSet(file, "Minutes",PlayerData[playerid][Minute]);
when player loggs
pawn Code:
SetPVarInt(playerid,"Minutes",dini_Int(file, "Minutes"));
            SetPVarInt(playerid,"Hours",dini_Int(file, "Hours"));
and forward/public
pawn Code:
forward Hours(playerid);
public Hours(playerid)
{
    SetPVarInt(playerid, "Hours", GetPVarInt(playerid, "Hours")+1);
    return 1;
}
forward Minutes(playerid);
public Minutes(playerid)
{
    SetPVarInt(playerid, "Minutes", GetPVarInt(playerid, "Minutes")+1);
    return 1;
}
Reply


Messages In This Thread
lil question - by tanush - 02.04.2011, 01:37
Re: lil question - by -Rebel Son- - 02.04.2011, 01:39
Re: lil question - by tanush - 02.04.2011, 01:48
Re: lil question - by -Rebel Son- - 02.04.2011, 01:53
Re: lil question - by tanush - 02.04.2011, 02:00
Re: lil question - by -Rebel Son- - 02.04.2011, 02:04
Re: lil question - by tanush - 02.04.2011, 02:11
Re: lil question - by -Rebel Son- - 02.04.2011, 02:15
Re: lil question - by tanush - 02.04.2011, 03:08
Re: lil question - by Joe Staff - 02.04.2011, 06:35
Re: lil question - by tanush - 02.04.2011, 13:05
Re: lil question - by tanush - 02.04.2011, 14:13
Re: lil question - by SchurmanCQC - 02.04.2011, 14:16
Re: lil question - by -Rebel Son- - 02.04.2011, 14:53
Re: lil question - by tanush - 03.04.2011, 20:37
Re: lil question - by tanush - 05.04.2011, 19:41
Re: lil question - by gamer931215 - 05.04.2011, 23:28

Forum Jump:


Users browsing this thread: 1 Guest(s)