Raised This Month: $ Target: $400
 0% 

Problems with weapon on spawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
elplouk
Member
Join Date: Aug 2009
Location: France
Old 03-29-2011 , 18:39   Problems with weapon on spawn
Reply With Quote #1

Hi

I would like a plugin that gives players a weapon + knife, vesthelm and ammo.
For exemple, for the ak47, I have this one :
Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <fakemeta>

public plugin_init() 
{
    register_plugin("Drop arme: Ak47", "1.0", "MiniB")
    RegisterHam(Ham_Spawn, "player", "ham_PlayerSpawn_Post", 1)
}

public ham_PlayerSpawn_Post(id)
{
    if (is_user_alive(id))
    {
        strip_user_weapons(id)
        set_pdata_int(id, 116, 0)
        
        give_item(id, "weapon_knife")
        give_item(id, "weapon_ak47")
        cs_set_user_bpammo(id, CSW_AK47, 90)
        cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
    }
}
But I have a problem with it
For exemple, if you choose the plugin that give usp on spawn, when you are CT, the plugin strip off your usp without giving another one. When the weapon of the plugin and the weapon at spawn are the same, the player have nothing

Maybe a code modification could be made to solve this ?
elplouk is offline
 



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 00:11.


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