FunkySwerve wrote...
The solution I described above will store anything you want it to. The ONLY difficulty is making sure that the player has an undroppable 'storage' item, which you can accomplish with a few lines of code when they enter the server. You then set and get all variables relating to that player on that item. Here's the code for entering the server. All of my code will assume the resref and tag of the undroppable storage item you'll need to make are 'pc_storage'.object oPC = GetEnteringObject(); object oStorage = GetItemPossessedBy(oPC, "pc_storage"); if (!GetIsObjectValid(oStorage)) { oStorage = CreateItemOnObject("pc_storage", oPC); SetItemCursedFlag(oStorage, TRUE); }
Then, whenever you would set or get a variable on the pc, instead get the storage item and set it on that instead, using GetItemPossessedBy(oPC, "pc_storage"); As mentioned, you'll want to ExportSingleCharacter(oPC); after you do this.
So, instead of:SetLocalInt(oPC, "SomeVarName", 3);
you would do:object oStorage = GetItemPossessedBy(oPC, "pc_storage"); SetLocalInt(oStorage, "SomeVarName", 3);
This is no where near as difficult as you seem to think it should be.
Funky
Okay got it to compile, What I did, there was already onentering oPC line so I simply added the rest under it ^^
So now its compiled and stuff I won't have to do anything else right?
(sometimes takes a while till my little brain understands it)





Retour en haut






