View Single Post
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 09-10-2014 , 12:31   Re: [INC] HPVars - Player variable's
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
@Emp, you mean like this ?

player_vars.inc


I used Trie[g/s]etArray because a trie is not a heterogeneous container, so it can't store both cell & multicell.
This is betterbecause it uses Tries, but you also lost the functionality of having custom names associated for the variables, which is what Hirsw0w was advocating. Your system only allows one variable per id number, but you could use incrementing offsets to get different id numbers.

But this is still adding extra native calls for getting/setting a variable. Below is a note from cellarray.inc, but I feel it applies to this too:
Code:
/**
 * These arrays are intended to be used for a form of global storage without 
 * requiring a #define that needs to be increased each time a person needs more 
 * storage.
 * These are not designed to be used as a replacement for normal arrays, as
 * normal arrays are faster and should be used whenever possible.
 */

Last edited by Emp`; 09-10-2014 at 12:32.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`