View Single Post
  #6  
Old 08-21-2014, 02:33 AM
Restraint Restraint is offline
NaS
Join Date: Jan 2014
Posts: 21
Restraint will become famous soon enough
Have you considered simply using TStaticVars? It will likely simplify what you're trying to do.

You create a TStaticVar as follows:

PHP Code:
  temp.opt this.options = new TStaticVar(); 
Then you can access, say, this.options.(@player.account) like:

PHP Code:
  opt.(@player.account) = ...; 
You could get the "keystrings" via something like:

PHP Code:
  temp.vars opt.getDynamicVarNames(); 
You could toss it to other scripts easily.

You could pass it from clientside to serverside via something like:

PHP Code:
  temp.info opt.saveVarsToArray(false);
  
triggerServer("weapon"this.nameinfo); 
With the serverside looking like:

PHP Code:
function onActionServerside(info) {
  
temp.opts this.options = new TStaticVar();
  
opts.loadVarsFromArray(info);
  ...

It'd generally allow for a lot more of what you're trying to do, since "this.options" is now a path like you want.
Reply With Quote