#include "av_persist" void main() { //if(object oPC = GetFirstPC(; //SavPlayer(oPC); int player_hb_counter; object oPC = OBJECT_INVALID; oPC = GetFirstPC(); while (oPC != OBJECT_INVALID) { if (GetIsObjectValid(GetArea(oPC)) == TRUE) { SetLocalLocation(oPC, "currentLoc", GetLocation(oPC)); } oPC = GetNextPC(); } /* END HACK */ // Get the player hb counter and increase it player_hb_counter = GetLocalInt(OBJECT_SELF, "player_hb_counter"); player_hb_counter++; // save all the player locs every 60 secs if (player_hb_counter >= 25) { player_hb_counter = 0; SavAllPlayers(); } // set updated counter SetLocalInt(OBJECT_SELF, "player_hb_counter", player_hb_counter); }