Raised This Month: $32 Target: $400
 8% 

DropPlayerItem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xaphan
SourceMod Donor
Join Date: Jun 2008
Old 04-01-2009 , 04:55   DropPlayerItem
Reply With Quote #1

DropPlayerItem doesn't exist?

Any other way to drop weapon without using any of the below commands?
FakeClientCommand/FakeClientCommandEx or RemovePlayerItem

I would like to drop.

PHP Code:
new g_PrimaryWeapon = -1;
#define CS_SLOT_PRIMARY 0

g_PrimaryWeapon GetPlayerWeaponSlot(clientCS_SLOT_PRIMARY);

if (
g_PrimaryWeapon != -1)
{
    
decl StringPrimaryWeapon_Name[64];
    
GetEdictClassname(g_PrimaryWeaponPrimaryWeapon_Namesizeof(PrimaryWeapon_Name));
    
//RemovePlayerItem(client, g_PrimaryWeapon);
    //FakeClientCommand(client, "drop g_PrimaryWeapon");
    //FakeClientCommandEx(client, "drop g_PrimaryWeapon");

    
DropPlayerItem(clientg_PrimaryWeapon);

    return 
true;


Last edited by Xaphan; 04-01-2009 at 04:58.
Xaphan is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 04-01-2009 , 10:17   Re: DropPlayerItem
Reply With Quote #2

command is only only "drop". Get client's weapon, check if weapon is what you want and then FakeClientCommandEx(client,"drop");

There is another way, using a signature. Take a look at Liam's plugin : http://forums.alliedmods.net/showthread.php?p=611885
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Xaphan
SourceMod Donor
Join Date: Jun 2008
Old 04-01-2009 , 12:14   Re: DropPlayerItem
Reply With Quote #3

Thanks for the info SAMURAI16
Using a signature (Liam's way) worked perfect.
I knew DropPlayerItem would be too easy... ;)
Xaphan 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 02:34.


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