Raised This Month: $51 Target: $400
 12% 

How to remove a knife on ground?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cREANy0
SourceMod Donor
Join Date: Jul 2012
Location: Germany
Old 10-20-2013 , 09:10   How to remove a knife on ground?
Reply With Quote #1

Hey,

can someone tell me how to remove knifes on ground?

greetz cREANy0
__________________
cREANy0 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-20-2013 , 09:16   Re: How to remove a knife on ground?
Reply With Quote #2

*edit
FindEntityByClassname

check weapon m_iState
0 = no one carrying
1 = player carrying
2 = player equipped

*edit
and AcceptEntityInput(entity, "kill");
__________________
Do not Private Message @me

Last edited by Bacardi; 10-20-2013 at 09:19.
Bacardi is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 10-20-2013 , 12:16   Re: How to remove a knife on ground?
Reply With Quote #3

Quote:
Originally Posted by cREANy0 View Post
Hey,

can someone tell me how to remove knifes on ground?

greetz cREANy0
If you're talking about the plugin you made for cs:go where you spawn the knife then check if the player has access then try making the knife only if the player has access.
This:
Code:
        new iKnifeEntity = GivePlayerItem(client, "weapon_knife_karambit");
 
        if(DoIHaveAccess)
        {
               
        EquipPlayerWeapon(client, iKnifeEntity);  
 
        }
        else
        {              
               
               
        }
}
To This:
Code:
       
 
        if(DoIHaveAccess)
        {
        new iKnifeEntity = GivePlayerItem(client, "weapon_knife_karambit");   
        EquipPlayerWeapon(client, iKnifeEntity);  
 
        }
        else
        {              
               
               
        }
}
Mitchell is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 10-21-2013 , 13:44   Re: How to remove a knife on ground?
Reply With Quote #4

Quote:
Originally Posted by Bacardi View Post
*edit
FindEntityByClassname

check weapon m_iState
0 = no one carrying
1 = player carrying
2 = player equipped

*edit
and AcceptEntityInput(entity, "kill");
Wow; didn't know.

Which games ? CSS only ?

<3,

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-21-2013 , 13:55   Re: How to remove a knife on ground?
Reply With Quote #5

aaa... all games sort of.
example cs and dod games, where you can drop and pick weapon, it have all three state.
TF2 again have only two of these, carrying and equip.

Try your self, open your game (don't join servers)
in console
sv_lan 1; map map name; sv_cheats 1

To see current "rendered" entities
cl_entityreport_sorted 1;cl_entityreport 1

look entity index and use
cl_pdump entity_index
You see some entity properties

and close cl_entityreport 0
to get better view

-snip-
*edit
https://developer.valvesoftware.com/wiki/Cl_pdump
hudlayout
__________________
Do not Private Message @me

Last edited by Bacardi; 10-21-2013 at 14:21.
Bacardi 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 08:15.


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