AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem's (https://forums.alliedmods.net/showthread.php?t=158968)

XIII 06-11-2011 07:18

Problem's
 
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

chaotix911 06-11-2011 11:33

Re: Problem's
 
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


All times are GMT -4. The time now is 23:27.

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