Raised This Month: $ Target: $400
 0% 

Drop Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Hunter S. Thompson
Senior Member
Join Date: Jun 2012
Old 11-06-2012 , 17:17   Re: Drop Weapon
Reply With Quote #11

Quote:
Originally Posted by Kriax View Post
How do i check if the weapon is awp slots (for example).
I can not use GetClientWeapon view that he took the weapon in his hands.

Thank you.

Kriax.


Spoiler
0 is primary, 1 is secondary. Not sure about grenades.
Hunter S. Thompson is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 11-06-2012 , 18:05   Re: Drop Weapon
Reply With Quote #12

PHP Code:
public OnPluginStart()
{
    
HookEvent"item_pickup",        EVENT_ItemPickUp );
}

public 
EVENT_ItemPickUpHandle:event, const String:name[], bool:dontBroadcast )
{
    new 
client GetClientOfUserIdGetEventInt(  event"userid" ));
    
    if ( 
client && IsClientInGameclient ))
    {
        new 
weapon GetPlayerWeaponSlotclient);
        
        
decl String:WeaponCheck[64];
        
GetEntityClassnameweaponWeaponChecksizeofWeaponCheck ));
        if ( 
StrContainsWeaponCheck"awp"false ) != -)
        {
            
PrintToChatAll"This dude name %N just pick up AWP"client );
        }
    }

__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Kriax
Senior Member
Join Date: Apr 2012
Old 11-07-2012 , 11:45   Re: Drop Weapon
Reply With Quote #13

Thank You
Kriax 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 21:37.


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