Initial commit
Initial commit [v9.7]
This commit is contained in:
18
_module/nss/ent_autosave.nss
Normal file
18
_module/nss/ent_autosave.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
void main()
|
||||
{
|
||||
// Get the creature who triggered this event.
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
// Only fire for (real) PCs.
|
||||
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
|
||||
return;
|
||||
|
||||
// Only fire once.
|
||||
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
|
||||
return;
|
||||
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
DoSinglePlayerAutoSave();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user