Raised This Month: $ Target: $400
 0% 

Prevent spawning on second connect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-08-2012 , 08:52   Re: Prevent spawning on second connect
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <fakemeta>

//#define RESET_ON_NEW_ROUND

new Trie:SteamIds;

public 
plugin_init()
{
#if defined RESET_ON_NEW_ROUND
    
register_event("HLTV""OnHltv""a""1=0""2=0");
#endif

    
SteamIds TrieCreate();
}

public 
plugin_end()
    
TrieDestroy(SteamIds);

public 
client_putinserver(client)
{
    new 
steamId[35];
    
get_user_authid(clientsteamIdcharsmax(steamId));
    
    if (
TrieKeyExists(SteamIdssteamId))
        
set_pdata_int(client3651);
    else
        
TrieSetCell(SteamIdssteamIdtrue);
}

#if defined RESET_ON_NEW_ROUND
public OnHltv()
    
TrieClear(SteamIds);
#endif 
hleV 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 05:48.


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