AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   drop weapon (https://forums.alliedmods.net/showthread.php?t=25917)

P34nut 03-23-2006 14:29

drop weapon
 
how can i check if a player has dropped a weapon/bomb(without using client_PreThink)

Thanks for help...

P34nut

Hawk552 03-23-2006 15:46

I am not sure if this works or not.

Code:
register_clcmd("drop","my_func")

v3x 03-23-2006 16:01

It works. I used it in my Satchel Charges plugin to drop the detonator when the player had the knife out.

VEN 03-24-2006 02:00

He said
Quote:

has dropped
When command is called i fairly sure that player still have a weapon.
It's possible to use a task with a short delay but i don't think that would work good in some cases.
I prefer fakemeta set_model way which i used in my "No weapon drop on death" plugin.

teame06 03-24-2006 02:21

Code:
register_event("BombDrop", "bomb_drop", "b") /* Bomb has been dropped */ public bomb_drop(id) {      new name[32]      get_user_name(id, name, 31)      client_print(0, print_chat, "%s has dropped the bomb", name) }

That one way of doing that.

VEN 03-24-2006 10:25

Note: fakemeta set_model method would work for any drop: manual, automatic (buy, death). Also you have to check owner to filter out weapon buy/give.

P34nut 03-24-2006 14:36

Ok its works in my script now :D
thanks everyone

this 1 can be closed :D


All times are GMT -4. The time now is 16:43.

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