This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Blocking spawned CSDM items


Post New Thread Reply   
 
Thread Tools Display Modes
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-24-2007 , 10:04   Re: Blocking spawned CSDM items
Reply With Quote #11

omg, stop talking in name of other peoples... Use {} where?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 10-28-2007 , 00:03   Re: Blocking spawned CSDM items
Reply With Quote #12

Quote:
Originally Posted by kp_uparrow View Post
use {} ?
yes he declared touch
Where?
Quote:
Originally Posted by Alka View Post
try to replace last FMRES_IGNORED with FMRES_HANDLED :/

Edit:I don't think will work. Should be FMRES_IGNORED but , you'r example should work :s

Try to use equali(classname[0], "w")) and so...instead of classname[0] == 'w'
Tried it
Didn't work also.
Or maybe I screwed up with all those brackets...
__________________
It's a mystery.
Mini_Midget is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-28-2007 , 06:16   Re: Blocking spawned CSDM items
Reply With Quote #13

Did you register the forward in plugin_init ?
ConnorMcLeod is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 10-28-2007 , 06:27   Re: Blocking spawned CSDM items
Reply With Quote #14

Of course
__________________
It's a mystery.
Mini_Midget is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-28-2007 , 06:44   Re: Blocking spawned CSDM items
Reply With Quote #15

Lol, i had to re-ask since you didn't answer
ConnorMcLeod is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-28-2007 , 06:45   Re: Blocking spawned CSDM items
Reply With Quote #16

Dunno, but should work... :-S
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 10-28-2007 , 06:50   Re: Blocking spawned CSDM items
Reply With Quote #17

Odd...
It doesn't seem to block the CSDM items no matter what...
It does block the normal stuff though.
PHP Code:
...
    
register_forward(FM_Touch,"fw_Touch");
...

public 
fw_Touch(pTouchedpToucher)
{
    if(!
get_pcvar_num(zomb_switch))
        return 
FMRES_IGNORED
    
    
if (!pev_valid(pTouched) || !is_user_connected(pToucher) || !g_zombie[pToucher])
        return 
FMRES_IGNORED
    
    
static className[32]
    
pev(pTouchedpev_classnameclassNamesizeof className 1)
    
    for(new 
sizeof g_EntClass i++)
    {
        if(
equali(classNameg_EntClass[i]))
        {
            return 
FMRES_SUPERCEDE
        
}
    }
    
    if ( 
equali(className"weaponbox") || equali(className"armoury_entity" ) || equali(className"weapon_shield" ) )
        return 
FMRES_SUPERCEDE
    
    
return FMRES_IGNORED

__________________
It's a mystery.
Mini_Midget is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-28-2007 , 06:51   Re: Blocking spawned CSDM items
Reply With Quote #18

How did you register the forward ?
Also can you make debug code to log/see if touch items are well done ?
ConnorMcLeod is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 10-28-2007 , 06:55   Re: Blocking spawned CSDM items
Reply With Quote #19

Quote:
Originally Posted by connorr View Post
How did you register the forward ?
Also can you make debug code to log/see if touch items are well done ?
PHP Code:
public plugin_init() 
{
//... Other stuff
    
register_forward(FM_Touch,"fw_Touch");
//... Some other stuff

The plugin doesn't give me any errors surprisingly!
__________________
It's a mystery.
Mini_Midget is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 10-30-2007 , 05:10   Re: Blocking spawned CSDM items
Reply With Quote #20

Is it possible to block weapon pickup by models instead of classnames or will that give bad results?
__________________
It's a mystery.
Mini_Midget is offline
Reply



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 22:22.


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