Raised This Month: $ Target: $400
 0% 

Help with TravTrie.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-14-2016 , 09:31   Re: Help with TravTrie.
Reply With Quote #3

You should just tag it:
PHP Code:
TrieKeyExistsTrie:g_tBlockModel 
Or if you want it like a stock:
PHP Code:
stock bool:TravTrieKeyExists(TravTrie:HandleTravTrie, const Key[])
{
    return 
TrieKeyExists(Trie:HandleTravTrie,key)

Also, given your code, you don't need TravTries, just use normal tries. You would use TravTrie when you want to iterate over all keys(see an example in Entities Resources Replacement). Also consider to replace FM_Touch with Ham_Touch/register_touch, depending on your needs. FM_Touch is bad because you get all kind of touch between entities, while with ham/engine you can filter by classname inside module and it's better.
Also, doing pev_valid(id) is dumb.

Quote:
- How to use Iterator to save key in trie when map changed? That's realy confuse for me.
What? Trie is deleted on map change, if you want to save stuffs between maps you need files/vault/sql.
__________________

Last edited by HamletEagle; 05-14-2016 at 09:47.
HamletEagle is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode