Raised This Month: $ Target: $400
 0% 

Weapon strip on new round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-25-2009 , 20:54   Re: Weapon strip on new round
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>

#define OFFSET_TEAM        114

enum CsTeams 
{
    
CS_TEAM_UNASSIGNED 0,
    
CS_TEAM_T,
    
CS_TEAM_CT,
    
CS_TEAM_SPECTATOR 
}

public 
plugin_init() 
{
        
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}
 

public  
fwHamPlayerSpawnPost(id

    if(
is_user_alive(id) && (fm_cs_get_user_team(id) == CS_TEAM_T) && !is_user_bot(id)) 
    { 
        
fm_strip_user_weapons(id); 
        
fm_give_item(id"weapon_knife"); 
    } 
}  

public 
CsTeams:fm_cs_get_user_team(id)
{
    return 
CsTeams:get_pdata_int(idOFFSET_TEAM);

__________________
Bugsy is offline
Reply



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 01:26.


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