Raised This Month: $ Target: $400
 0% 

Trie for every player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-06-2011 , 14:43   Re: Trie for every player
Reply With Quote #4

Code:
new Trie:g_tPlayerAbility public plugin_init() {     g_tPlayerAbility = TrieCreate() } SetUserAbilityLength(id) {     new szSteamID[32]     get_user_authid(id, szSteamID, charsmax(szSteamID))     TrieSetCell(g_tPlayerAbility, szSteamID, get_systime() + 300) } bool:HasUserAbility(id) {     new iExpireTime, szSteamID[32]     get_user_authid(id, szSteamID, charsmax(szSteamID))     if( TrieGetCell(g_tPlayerAbility, szSteamID, iExpireTime) )     {         if( iExpireTime < get_systime() )         {             return false         }         TrieDeleteKey(g_tPlayerAbility, szSteamID)     }     return true }
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-06-2011 at 15:16.
ConnorMcLeod 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 04:25.


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