View Single Post
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death"
Old 05-09-2012 , 10:36   Re: Array Question
Reply With Quote #7

Quote:
Originally Posted by Dr!fter View Post
Use a trie. Its faster and easy to use.

Code:
new Handle:g_trie;//global trie public OnPluginStart() {     g_trie = CreateTrie();//Create          SetTrieValue(g_trie, "Smoke", 5000); //Store the values     SetTrieValue(g_trie, "Flash", 6000);     SetTrieValue(g_trie, "Godmode", 8000); } public OnPluginEnd() {     CloseHandle(g_trie);//Make sure to close the trie. } MyRandomFunction() { //Grab the Smoke value.     new value;     if(GetTrieValue(g_trie, "Smoke", value))     {        &nb sp;PrintToServer("The value for smoke is %i", value);     }     else     {        &nb sp;PrintToServer("Failed to get the value for smoke from the trie");     } }
Thanks you for your exponation

__________________
Sorry for my bad English, I'm Belgian
Razmo51 is offline