Reset Every Two Weeks help +rep
#2

Store his last connected time by using gettime(); function ( Its the seconds passed since 1st January 1970 ) no need for timers or such those things. and later check if the variable where you stored the last connection, if(gettime()-variablehere < 1209600) .. reset his vehicles. 1209600 = two weeks (seconds).

pawn Код:
enum pInfo
{
    lastconnection
}
new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerDisconnect(playerid)
{
    PlayerInfo[playerid][lastconnection] = gettime();
    return 1;
}
/////////later however way you'll use to check the inactive players its recommended to use them OnGameModeint
if(gettime() - PlayerInfo[playerid][lastconnection] < 1209600)
{
    ResetOfflinePlayerFileV...
}
Reply


Messages In This Thread
Reset Every Two Weeks help +rep - by KillerStrike23 - 16.09.2014, 13:23
Re: Reset Every Two Weeks help +rep - by SilentSoul - 16.09.2014, 13:53
Re: Reset Every Two Weeks help +rep - by KillerStrike23 - 16.09.2014, 14:12
Re: Reset Every Two Weeks help +rep - by SilentSoul - 16.09.2014, 14:17
Re: Reset Every Two Weeks help +rep - by AroseKhanNiazi - 16.09.2014, 14:25
Re: Reset Every Two Weeks help +rep - by SilentSoul - 16.09.2014, 14:30
Re: Reset Every Two Weeks help +rep - by AroseKhanNiazi - 16.09.2014, 15:01
AW: Reset Every Two Weeks help +rep - by Nero_3D - 16.09.2014, 15:31
Re: AW: Reset Every Two Weeks help +rep - by AroseKhanNiazi - 16.09.2014, 16:32
Re: Reset Every Two Weeks help +rep - by KillerStrike23 - 16.09.2014, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)