Raised This Month: $ Target: $400
 0% 

Problem's


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XIII
Junior Member
Join Date: Jun 2011
Old 06-11-2011 , 07:18   Problem's
Reply With Quote #1

Hello ,

I have take code of connor mc leod for the give_weapon_jail but when a terrorist kill me i get weapon when i respawn but when the ct win we respawn and we don't get weapon just a cut ... can you give me a good code plz

Regard's XIII
XIII is offline
chaotix911
Junior Member
Join Date: Jun 2010
Old 06-11-2011 , 11:33   Re: Problem's
Reply With Quote #2

Try this.

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

#define VERSION "0.0.1"

#define OFFSET_PRIMARYWEAPON        116

public plugin_init()
{
    
register_plugin("Jail Give Weapons"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Spawn"player""Player_Spawn_Post"1)
}

public 
Player_Spawn_Postid )
{
    if( 
is_user_alive(id) )
    {
        
strip_user_weapons(id)
        
set_pdata_int(idOFFSET_PRIMARYWEAPON0)

        
give_item(id"weapon_knife")

        if( 
cs_get_user_team(id) == CS_TEAM_CT )
        {
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(idCSW_DEAGLE35)
            
give_item(id"weapon_m4a1")
            
cs_set_user_bpammo(idCSW_M4A190)
        }
    }

thanks and credits to ConnorMcLeod
chaotix911 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 23:27.


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