Raised This Month: $ Target: $400
 0% 

Block pickup for everything except C4


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-08-2009 , 10:26   Block pickup for everything except C4
Reply With Quote #1

To not create a new thread, I've changed the title and the first post.
So, how can I block any entity from picking up except C4?

It just can't catch 'models/w_c4.mdl' while catches any other model perfectly.
Code:
#include <fakemeta>   public plugin_init()         register_forward(FM_Touch, "fwTouch");   public fwTouch(iEnt, iCl) {         if (!pev_valid(iEnt) || !is_user_alive(iCl))                 return FMRES_IGNORED;           static szClass[32], szMdl[32];         pev(iEnt, pev_classname, szClass, sizeof(szMdl) - 1);         pev(iEnt, pev_model, szMdl, sizeof(szMdl) - 1);           if (equali(szClass, "weaponbox") || equali(szClass, "armoury_entity")         || equali(szClass, "weapon_shield") || equali(szClass, "grenade")))                 if (!equali(szMdl, "models/w_c4.mdl"))                         return FMRES_SUPERCEDE;           return FMRES_IGNORED; }
__________________

Last edited by hleV; 01-08-2009 at 12:53. Reason: Block pickup for everything except C4
hleV is offline
 


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 09:13.


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