Raised This Month: $ Target: $400
 0% 

Remove weapons with Ham_RemovePlayerItem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 03-13-2011 , 05:56   Remove weapons with Ham_RemovePlayerItem
Reply With Quote #1

Could someone point me out why Ham_RemovePlayerItem doesn't work in this piece of code? And that engclient_cmd too, I couldn't figure out why it doesn't work so I commented out the lines.

PHP Code:
RegisterHam(Ham_AddPlayerItem"player""Player_AddPlayerItem")
public 
Player_AddPlayerItem(clientWeapIndex)
{
    if (
ExecuteHam(Ham_Item_ItemSlotWeapIndex) == SLOT_PRIMARY)
    {
        
// new szClassname[16]
        // pev(WeapIndex, pev_classname, szClassname, charsmax(szClassname))
        
        //engclient_cmd(client, "drop", szClassname)
        
ExecuteHam(Ham_RemovePlayerItemclientWeapIndex)
    }

    return 
HAM_IGNORED

Note: Reason why I don't block it with HAM_SUPERCEDE is because I want players to drop the weapons so other players could pick it up.

Last edited by Mlk27; 03-13-2011 at 08:58.
Mlk27 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 23:40.


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