generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
32
_module/nss/pwdb_mod_onclex.nss
Normal file
32
_module/nss/pwdb_mod_onclex.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: Created By: Valerio Santinelli - tanis@mediacom.it
|
||||
//:: Created On: 2002/08/09
|
||||
//:://////////////////////////////////////////////////
|
||||
/*
|
||||
Persistent World DataBase module's OnClientExit script.
|
||||
Credits to E.J. Wilburn - zane@supernova.org for the original idea.
|
||||
|
||||
Store the player's location in a persistant variable.
|
||||
this goes on module_OnClientExit
|
||||
*/
|
||||
|
||||
#include "pwdb_functions"
|
||||
|
||||
void PWDB_SaveCurrentLocation(object oClient)
|
||||
{
|
||||
WriteTimestampedLogEntry("Trying to save the player's exit location");
|
||||
WriteTimestampedLogEntry("Found: " + GetTag(oClient));
|
||||
|
||||
// Exit and do nothing if this isn't a player.
|
||||
if (!GetIsPC(oClient)) {
|
||||
WriteTimestampedLogEntry("Cannot save location since this is not a player.");
|
||||
return;
|
||||
}
|
||||
|
||||
WriteTimestampedLogEntry("Setting variables on client exit");
|
||||
SetPersistentString(oClient, "PV_TEST_STRING", "Testing");
|
||||
SetPersistentInt(oClient, "PV_TEST_INT", 99);
|
||||
SetPersistentFloat(oClient, "PV_TEST_FLOAT", 9.9f);
|
||||
SetPersistentObject(oClient, "PV_TEST_OBJECT", GetArea(oClient));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user