Raised This Month: $51 Target: $400
 12% 

Help With Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jrod
New Member
Join Date: Oct 2014
Location: USA
Old 12-29-2014 , 16:56   Help With Plugin
Reply With Quote #1

Well i need to disable the detaching of the USPS silencer... This is what i got so far, i am new to scripting

PHP Code:
#include <sourcemod>

public OnPluginStart()
{
    
HookEvent("silencer_detach",Event_SilencerDetach);
}

public 
ActionEvent_SilencerDetach(Handle:event, const String:name[], bool:dontbroadcast)
{
    


Last edited by Jrod; 12-29-2014 at 17:04.
Jrod is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-29-2014 , 17:21   Re: Help With Plugin
Reply With Quote #2

HookEvent wont work as the event has already processed and returning Plugin_Stop wont do anything.

Checking SDKTools hooks include. There doesn't appear to be a hook for you to latch on.

I'm thinking you need to use RunUserCmd (Off top of head) and check / block the key being pressed to remove the silencer.
__________________
Neuro Toxin is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 12-29-2014 , 18:38   Re: Help With Plugin
Reply With Quote #3

Probably a hacky way of doing it would be just to disable right click when a weapon with a silencer is currently equipped... just a thought.
Drixevel is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-29-2014 , 19:08   Re: Help With Plugin
Reply With Quote #4

I think that's the only way atm considering there is no sdk hook to help.
__________________
Neuro Toxin 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 05:48.


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