Raised This Month: $114 Target: $400
 28% 

Free Equips (Version 1.1)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Hawk552 (427)
wilson409
Junior Member
Join Date: May 2006
Location: 香港HongKong
Old 08-20-2009 , 02:46   Free Equips (Version 1.1)
Reply With Quote #1

Free Equips
Description:

When a Ct is spawned , he will get defuser kit,
hegrenade,smokegrenade,flashbang,nightvision and armor
and T just without defuser kit

Cvar:

free_equips 1/0 - 1 enabled / 0 - disabled (def 1)

Modules:

- cstrike
- hamsandwich
- fun

Credits]
fysiks - switch( get_user_team(id) )

Version1.1]
Just added Credits
Attached Files
File Type: sma Get Plugin or Get Source (Free_equips.sma - 4239 views - 1.2 KB)

Last edited by wilson409; 09-19-2009 at 04:27.
wilson409 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-20-2009 , 03: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
ds811888
BANNED
Join Date: Mar 2009
Location: Hong Kong
Old 08-20-2009 , 03:15   Re: Free Equips
Reply With Quote #3

Nice plugin
ds811888 is offline
wilson409
Junior Member
Join Date: May 2006
Location: 香港HongKong
Old 08-20-2009 , 03:22   Re: Free Equips
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
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 );
            }
        }
    }

Thanks ! Edited
wilson409 is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 08-20-2009 , 03:39   Re: Free Equips
Reply With Quote #5

gj
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!
biscuit628 is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 08-20-2009 , 03:43   Re: Free Equips
Reply With Quote #6

How is this different than putting those things in autobuy.txt ?
__________________

Jack86 is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-20-2009 , 07:23   Re: Free Equips
Reply With Quote #7

Quote:
Originally Posted by Jack86 View Post
How is this different than putting those things in autobuy.txt ?
You don't pay for them, that's why it's called "free equip"
__________________
Hunter-Digital is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 08-20-2009 , 09:37   Re: Free Equips
Reply With Quote #8

Ooh, i missed that part
__________________

Jack86 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-06-2009 , 15:08   Re: Free Equips
Reply With Quote #9

This plugin is well done.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approved.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-06-2009 , 15:22   Re: Free Equips
Reply With Quote #10

This
PHP Code:
        switch( get_user_team(id) )
        {
            case 
1:
            {
                
// Team 1
            
}
            case 
2:
            {
                
// Team 2
                
cs_set_user_defuseid100205 );
            }
        } 
Could be replaced by

PHP Code:
        if( cs_get_user_teamid ) == CS_TEAM_CT )
        {
            
cs_set_user_defuseid100205 );
        } 
__________________
xPaw is offline
Reply


Thread Tools
Display Modes

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 11:57.


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