How to make hours of playing system? Ideas?
#2

make a timer and every minute check if player is connected or logged and give a point or score like this
pawn Код:
enum pInfo
{
pTime
};
new ShitInfo[MAX_PLAYERS][pInfo];
new timer;
OnGameModeInit()
{
timer = SetTimer("CheckTime",60000,1);
return 1;
}
OnGameModeExit()
{
KillTimer(timer);
return 1;
}
forward CheckTime()
Public CheckTime()
{
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
ShitInfo[i][pTime]++;
}
}
return 1;
}
replace ShitInfo you can use put like score, exemple SetPlayerScore(GetPlayerScore(i)+1);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)