View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-20-2009 , 02:13   Re: Free Equips
Reply With Quote #2

Here's my thoughts on the code:

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>

#define PLUGIN_NAME "Free Equips"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "BBQ"

#pragma semicolon 1

new gEnableEquips;

public 
plugin_init()
{
    
register_pluginPLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR );
    
RegisterHamHam_Spawn"player""free_equips");
    
gEnableEquips register_cvar"free_equips""1" );
}

public 
free_equips(id)
{
    if( 
is_user_aliveid ) && get_pcvar_numgEnableEquips ) )
    {
        
// Both Teams
        
give_item id,"weapon_hegrenade");
        
give_item id,"weapon_smokegrenade");
        
give_item id,"weapon_flashbang");
        
give_item id,"weapon_flashbang");
        
cs_set_user_nvgid1);
        
        switch( 
get_user_team(id) )
        {
            case 
1:
            {
                
// Team 1
            
}
            case 
2:
            {
                
// Team 2
                
cs_set_user_defuseid100205 );
            }
        }
    }

__________________
fysiks is offline