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

Knife Drop


Post New Thread Reply   
 
Thread Tools Display Modes
sooN
Veteran Member
Join Date: Apr 2009
Old 09-17-2009 , 15:10   Re: Knife Drop
Reply With Quote #11

yes i know but if he make an model knife, knife can touch the floor after ? no?

sorry for my bad english )=
__________________
sooN is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 09-17-2009 , 15:34   Re: Knife Drop
Reply With Quote #12

Quote:
Originally Posted by sooN View Post
yes i know but if he make an model knife, knife can touch the floor after ? no?

sorry for my bad english )=
yes
lazarev is offline
lowled
Senior Member
Join Date: Sep 2007
Old 09-17-2009 , 15:51   Re: Knife Drop
Reply With Quote #13

what is the diference between this one ( it is bugged , when 2 knife enter in contact, server crash, nobody wants to crrect it )

http://forums.alliedmods.net/showthread.php?t=2072
__________________
lowled is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 09-17-2009 , 21:19   Re: Knife Drop
Reply With Quote #14

Why not using Engine?

PHP Code:
stock ham_strip_weapon(idweapon[])
{
    if(!
equal(weapon,"weapon_",7)) 
        return 
0
    
    
new wId get_weaponid(weapon)
    
    if(!
wId) return 0
    
    
new wEnt
    
    
while((wEnt find_ent_by_class(wEntweapon)) && entity_get_edict(wEntEV_ENT_owner) != id) {}
    
    if(!
wEnt) return 0
    
    
if(get_user_weapon(id) == wId
        
ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
    
    if(!
ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) 
        return 
0
        
    ExecuteHamB
(Ham_Item_KillwEnt)
    
    
entity_set_int(idEV_INT_weaponsentity_get_int(idEV_INT_weapons) & ~(1<<wId))

    return 
1

__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-17-2009 , 21:59   Re: Knife Drop
Reply With Quote #15

@Metalicross

Good to know the engine method but emm.. i am not sure if is more eficient... i never used amxx profile so i am not sure at all of this but.... see:

Fakemeta:

Quote:
date: Thu Sep 17 22:520 2009 map: de_dust2
type | name | calls | time / min / max
-------------------------------------------------------------------
n | register_plugin | 1 | 0.000001 / 0.000001 / 0.000001
n | register_cvar | 5 | 0.000034 / 0.000007 / 0.000007
n | RegisterHam | 1 | 0.000010 / 0.000010 / 0.000010
n | register_clcmd | 1 | 0.000009 / 0.000009 / 0.000009
p | plugin_init | 1 | 0.000005 / 0.000005 / 0.000005
17 natives, 3 public callbacks, 5 function calls were not executed.

date: Thu Sep 17 22:526 2009 map: de_dust2
type | name | calls | time / min / max
-------------------------------------------------------------------
n | register_plugin | 1 | 0.000001 / 0.000001 / 0.000001
n | register_cvar | 5 | 0.000034 / 0.000007 / 0.000007
n | RegisterHam | 1 | 0.000009 / 0.000009 / 0.000009
n | register_clcmd | 1 | 0.000010 / 0.000010 / 0.000010
p | plugin_init | 1 | 0.000005 / 0.000005 / 0.000005
17 natives, 3 public callbacks, 5 function calls were not executed.
Engine:

Quote:
date: Thu Sep 17 22:520 2009 map: de_dust2
type | name | calls | time / min / max
-------------------------------------------------------------------
n | register_plugin | 1 | 0.000002 / 0.000002 / 0.000002
n | register_cvar | 5 | 0.000065 / 0.000007 / 0.000037
n | RegisterHam | 1 | 0.000112 / 0.000112 / 0.000112
n | register_clcmd | 1 | 0.000018 / 0.000018 / 0.000018
n | get_pcvar_num | 4 | 0.000002 / 0.000000 / 0.000001
n | get_user_weapon | 2 | 0.000004 / 0.000000 / 0.000003
n | client_print | 1 | 0.000019 / 0.000019 / 0.000019
n | equal | 1 | 0.000001 / 0.000001 / 0.000001
n | get_weaponid | 1 | 0.000010 / 0.000010 / 0.000010
n | find_ent_by_class | 1 | 0.000042 / 0.000042 / 0.000042
n | entity_get_edict | 1 | 0.000001 / 0.000001 / 0.000001
n | ExecuteHamB | 3 | 0.000063 / 0.000001 / 0.000057
n | entity_get_int | 1 | 0.000004 / 0.000004 / 0.000004
n | entity_set_int | 1 | 0.000001 / 0.000001 / 0.000001
p | HookCmdDrop | 1 | 0.000008 / 0.000008 / 0.000008
p | plugin_init | 1 | 0.000005 / 0.000005 / 0.000005
f | ham_strip_weapon | 1 | 0.000006 / 0.000006 / 0.000006
8 natives, 2 public callbacks, 4 function calls were not executed.

date: Thu Sep 17 22:526 2009 map: de_dust2
type | name | calls | time / min / max
-------------------------------------------------------------------
n | register_plugin | 1 | 0.000002 / 0.000002 / 0.000002
n | register_cvar | 5 | 0.000059 / 0.000007 / 0.000031
n | RegisterHam | 1 | 0.000108 / 0.000108 / 0.000108
n | register_clcmd | 1 | 0.000018 / 0.000018 / 0.000018
p | plugin_init | 1 | 0.000005 / 0.000005 / 0.000005
18 natives, 3 public callbacks, 5 function calls were not executed.
@ lowled

Well with my plugin you don't have to bind a key to drop the knife...

Mine have 2 types of drop.

Mine have an "onlyadmins" cvar so if you want... only admins can drop the knife.

Mine can hide the "This weapon cannot be dropped" msg.

And mine will be have more features....

Quote:
it is bugged , when 2 knife enter in contact, server crash
This happen with my plugin?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...

Last edited by Alucard^; 09-17-2009 at 22:24.
Alucard^ is offline
Send a message via Skype™ to Alucard^
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 09-17-2009 , 22:05   Re: Knife Drop
Reply With Quote #16

Quote:
Originally Posted by Alucard^ View Post
@Metalicross

Good to know the engine method but emm.. i am not sure if is more eficient... i never used amxx profile so i am not sure at all of this but.... see:

Hamsandwich:

Engine:

@ lowled

Well with my plugin you don't have to bind a key to drop the knife...

Mine have 2 types of drop.

Mine have an "onlyadmins" cvar so if you want only admins can drop the knife.

Mine can hide the "This weapon cannot be dropped" msg.

And mine will be have more features....

This happen with my plugin?
Hamsandwich and Engine? rofl, i'm talking about "Engine and Fakemeta"

http://forums.alliedmods.net/showthread.php?t=88792
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-17-2009 , 22:24   Re: Knife Drop
Reply With Quote #17

Ups, my mistake.... i tested with fakemeta/engine... fixed.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
lowled
Senior Member
Join Date: Sep 2007
Old 09-18-2009 , 11:11   Re: Knife Drop
Reply With Quote #18

can u add this cvar plz, taken from the old unfixed throwing knife plug :

Quote:
The amount of ammo to be given at roundstart (default 5) ( 1 or higher )
//amx_knifeammo 5

//Force at which knives are thrown (default 1200) ( 200 or higher )
//amx_knifetossforce 1200

//Maximum amount of knives allowed at once (default 10) ( amx_knifeammo or higher )
//amx_maxknifeammo 10

//Damage dealt on a knife hit (default 25) ( 1 or higher )

look at this, if you can add this when we don t have any knife : http://forums.alliedmods.net/showpos...4&postcount=14

it ll be so pretty

thx and good work, lot of karma if you fi this
//amx_knifedmg 25
__________________

Last edited by lowled; 09-18-2009 at 11:15.
lowled is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-18-2009 , 11:18   Re: Knife Drop
Reply With Quote #19

Quote:
Originally Posted by meTaLiCroSS View Post
Hamsandwich and Engine? rofl, i'm talking about "Engine and Fakemeta"

http://forums.alliedmods.net/showthread.php?t=88792
Quote:
Originally Posted by ot_207
Conclusions:
We must use the module when it has a specific good function that others don't provide.
The less module comunications the better!!!
And remember this tutorial does not want to say not to use fakemeta! It advises to use it only when it needs to be used!
A plugin isn't bad if it uses 10 modules instead of just 2...
If you propose to cache some results in a plugin, it will be more efficient but there will be a problem when we talk about easy scripting.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 09-18-2009 , 13:22   Re: Knife Drop
Reply With Quote #20

ot_207 that's because metalicross became obsessed with engine since people started to say that it was better, but they didn't said the details =)

@ lowled

This is working fine afaik..that one works with a bind and its worse
__________________
IneedHelp is offline
Reply


Thread Tools
Display Modes

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


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