Raised This Month: $ Target: $400
 0% 

Bit Sum Fun


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-30-2011 , 02:16   Re: Bit Sum Fun
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
Use info_map_parameters entity to disable buy on a wanted team.
Remove the StatusIcon hook.

PHP Code:
public plugin_precache() 
{
    new 
iEntity create_entity(info_map_parameters);
    
g_iTeamMode register_cvar("wm_teammode""1"); // 0 = both 1 = T only 2 = CT only.
        
    
switch(get_pcvar_num(g_iTeamMode))
    {
        case 
1DispatchKeyValue(iEntity"buying""1");
        case 
2DispatchKeyValue(iEntity"buying""2");
        default: 
DispatchKeyValue(iEntity"buying""3");
    }
    
    
DispatchSpawn(iEntity);
    
    
g_hSpawn register_forward(FM_Spawn"FwdSpawn");
}

public 
FwdSpawn(iEntity)
{
    static 
szClassname[32];
    
entity_get_string(iEntityEV_SZ_classnameszClassname31);
    
    if(
equal(szClassnameinfo_map_parameters)) 
    {
        
remove_entity(iEntity);
        return 
FMRES_SUPERCEDE;
    }
    return 
FMRES_IGNORED;

The above code for some reason no matter what the value of the cvar is. it allows both teams to buy.
Doc-Holiday 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 19:31.


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