02.04.2011, 03:08
thanks for everything but i have problem with saving it on connect,
on top
on player connect
OnPlayerDisconnect
When player registers
when player loggs
and forward/public
on top
pawn Code:
enum pData
{
AdminLevel,
Cash,
Score,
vip,
Hour,
Minute
};
new PlayerData[MAX_PLAYERS][pData];
pawn Code:
SetTimerEx("Hours",3600000, 1, "i", playerid);
SetTimerEx("Minutes", 60*1000, 1, "i", playerid);
pawn Code:
dini_IntSet(file, "Hours",PlayerData[playerid][Hour]);
dini_IntSet(file, "Minutes",PlayerData[playerid][Minute]);
pawn Code:
dini_IntSet(file, "Hours",PlayerData[playerid][Hour]);
dini_IntSet(file, "Minutes",PlayerData[playerid][Minute]);
pawn Code:
SetPVarInt(playerid,"Minutes",dini_Int(file, "Minutes"));
SetPVarInt(playerid,"Hours",dini_Int(file, "Hours"));
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;
}