Raised This Month: $ Target: $400
 0% 

hw to give ct armor n he-nade?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-04-2009 , 11:08   Re: hw to give ct armor n he-nade?
Reply With Quote #1

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

new bool:bIsFreezeTime

public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""HamPlayerSpawn"1)

    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")
    
register_logevent("LogEvent_Round_Start"2"1=Round_Start")
}

public 
Event_HLTV_New_Round()
{
    
bIsFreezeTime true
}

public 
LogEvent_Round_Start()
{
    
bIsFreezeTime false
}

public 
HamPlayerSpawn(id)
{
    if( 
is_user_aliveid ) ) // check if player is connected is useless
    
{
        
strip_user_weaponsid )
        
give_itemid"weapon_knife" )
        if( 
cs_get_user_teamid ) == CS_TEAM_CT )
        {
            if( 
bIsFreezeTime // here you check if it's the roundstart
            
{
                
give_itemid"weapon_deagle" )
                
cs_set_user_bpammoidCSW_DEAGLE35 )

                
give_itemid"weapon_hegrenade" )
                
cs_set_user_bpammoidCSW_HEGRENADE)
            }

            
cs_set_user_armor(id100CS_ARMOR_VESTHELM)
            
menu_displayidg_iMenu)
        }
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-04-2009 at 11:10.
ConnorMcLeod 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 17:40.


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