Raised This Month: $ Target: $400
 0% 

Weapon Give Dont Work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stylaa
Senior Member
Join Date: Oct 2009
Location: Flensburg, Germany
Old 10-20-2009 , 17:31   Weapon Give Dont Work
Reply With Quote #1

I have this Funktion and the CT īs dont get a deagle or m4
Pls say me what i done Wrong


Code:
public Player_Spawn_Post( id )
{
    if( is_user_alive(id) )
    {
        strip_user_weapons(id)
        set_pdata_int(id, OFFSET_PRIMARYWEAPON, 0)

        give_item(id, "weapon_knife")

        if( cs_get_user_team(id) == CS_TEAM_CT )
        {
            give_item(id, "weapon_deagle")
            cs_set_user_bpammo(id, CSW_DEAGLE, 35)
            give_item(id, "weapon_m4a1")
            cs_set_user_bpammo(id, CSW_M4A1, 90)
            cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
        }
    }
}

Last edited by Stylaa; 10-20-2009 at 17:42.
Stylaa is offline
Send a message via ICQ to Stylaa
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-20-2009 , 17:35   Re: Weapon Give Dont Work
Reply With Quote #2

Use [ php][/php], [ pawn][/pawn] or [ code][/code] tags in the future.

Does everything else work?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Stylaa
Senior Member
Join Date: Oct 2009
Location: Flensburg, Germany
Old 10-20-2009 , 17:42   Re: Weapon Give Dont Work
Reply With Quote #3

yes everythink else work

Last edited by Stylaa; 10-20-2009 at 17:45.
Stylaa is offline
Send a message via ICQ to Stylaa
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 10-20-2009 , 18:08   Re: Weapon Give Dont Work
Reply With Quote #4

Say precisely what works and what does not.

- Is the user stripped off his weapons.
- Is the user given a knife.
- Is the user given m4 / deagle.
- Is the user given armor and helmet.

Give full code or at least all relevant parts.
__________________
In Flames we trust!
Nextra is offline
benjibau
Veteran Member
Join Date: Jul 2009
Location: France (Nord 59)
Old 10-21-2009 , 15:36   Re: Weapon Give Dont Work
Reply With Quote #5

or use

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

public plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR 
    
RegisterHam(Ham_Spawn"player""Player_Spawn"1)
}

public 
Player_Spawn(id)
{
    if(
is_user_alive(id))
    { 
        if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
strip_user_weapons(id)
            
give_item(id"weapon_knife")
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammo(idCSW_DEAGLE35)
            
give_item(id"weapon_m4a1")
            
cs_set_user_bpammo(idCSW_M4A190)
            
cs_set_user_armor(id100CS_ARMOR_VESTHELM)
        }
    }

benjibau is offline
Send a message via MSN to benjibau
Reply


Thread Tools
Display Modes

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:36.


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