Raised This Month: $ Target: $400
 0% 

Weapon strip on new round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iknowiz58
Member
Join Date: Sep 2006
Old 01-25-2009 , 20:01   Re: Weapon strip on new round
Reply With Quote #1

here is what I found searching but how do i make it team specific?

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta_util>
 
public plugin_init() {
        
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}
 

public  
fwHamPlayerSpawnPost(id) { 

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

__________________

iknowiz58 is offline
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 #2

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