Raised This Month: $ Target: $400
 0% 

Restricting weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-05-2011 , 22:31   Re: Restricting weapons
Reply With Quote #3

Other things can touch weapons besides a player. With register_touch you can hook only a weapon\player touch.

You can hook only one or the other of these or both:
weaponbox = dropped weapons
armoury_entity = weapons that sit on ground at map start (fy_iceworld, fy_snow etc).

PHP Code:
#include <amxmodx>
#include <engine>

public plugin_init() 
{
    
register_touch"weaponbox" "player" "WeaponTouch" );
    
register_touch"armoury_entity" "player" "WeaponTouch" );
}

public 
WeaponTouchiWeapon iPlayer )
{
    return ( 
/* condition */ ) ? PLUGIN_HANDLED PLUGIN_CONTINUE;

__________________

Last edited by Bugsy; 11-05-2011 at 22:31.
Bugsy is offline
 



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 14:16.


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