33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
//:://////////////////////////////////////////////////
|
|
//:: 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));
|
|
}
|
|
|