16.09.2014, 13:53
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...
}