Function to Forbid Primary Weapons
can anyone write me a *function* to strip and drop any primary weapons when they are used and block them from being picked up from ground..
|
Re: Forbid Primary Weapons
Quote:
http://forums.alliedmods.net/showthread.php?t=78113 |
Re: Forbid Primary Weapons
Would be more efficient to use hamsandwich.
PHP Code:
|
Re: Forbid Primary Weapons
connor thanks man but that seems to ony block weapon picked up but it doesnt drop or strip bought primary weapons
|
Re: Forbid Primary Weapons
You haven't ask this clearly.
Needs more code, will do it later if nobody else has tried something, and if i can do it :mrgreen: -edit- Seems that restrict plugin in default amxx package would be the best. |
Re: Function to Forbid Primary Weapons
Here is working code; I originally had it coded it with FM_Touch but used ConnorMcLeods Ham forward instead for efficiency. The Ham_AddPlayerItem code is by danielkza. I'm sure there is an optimization that can be done.
PHP Code:
|
Re: Function to Forbid Primary Weapons
With this method, player's money is still taken.
And you don't need to hook Touch. PHP Code:
|
Re: Function to Forbid Primary Weapons
@bugsy
thanks..i uncommented the line to drop weapon instead cause with 'return HAM_SUPERCEDE' make players pick weapons and that leave no weapons on ground.. your code works but its not like i want..when i tested it, i still got to picked up weapons on ground at first then they got dropped..when i tried to pick the dropped weapons again, the code blocked it..ummm thats great but i don't understand why weapons are initially still pickup able when ham_touch already take care of that? can you make it so the weapons lying on ground ara not pickupable at all..and if players buy or are given with primary weapons, drop those weapons and block them from being picked up.. |
Re: Function to Forbid Primary Weapons
Quote:
|
Re: Function to Forbid Primary Weapons
yeh. i commented out ham_supercede because i dont want weapons to be taken away from ground when players step on those weapons.
Just completely block weapons on ground from being pick up and drop weapons when players buy them |
| All times are GMT -4. The time now is 17:01. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.