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

No spark on client fire


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 08-28-2006 , 10:19   No spark on client fire
Reply With Quote #1

I want to stop the client sparks when they fire a gun in cs!
Even if there is no nice way to do it there must be some dirty way to do it, like client commands or placing a teporary ent and then remove it again.

Thanks

EDIT:Bullethole thingy solved.
__________________
Sig(h)!

Last edited by Obbin; 08-28-2006 at 10:26.
Obbin is offline
raa
Senior Member
Join Date: Oct 2005
Old 08-02-2007 , 22:46   Re: No spark on client fire
Reply With Quote #2

anyone know how this guy could would have went about removing the bullet wall sparks?
__________________
raa is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 08-03-2007 , 10:59   Re: No spark on client fire
Reply With Quote #3

RAA, I believe if you block the PlaybackEvent it will block the bullet wall stuff.

On the same note, Obbin, if you hook FM_PlaybackEvent, you can create a tempent of sparks. I assume your question really boils down to how to hook a client firing in the most efficient way possible, and that is to hook FM_PlaybackEvent. If you need help creating the TempEnt, reply and let us know. Look in includes/message_const.inc for examples.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
raa
Senior Member
Join Date: Oct 2005
Old 08-03-2007 , 14:34   Re: No spark on client fire
Reply With Quote #4

Hmm would someone please post an example of how to block PlaybackEvent

Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event("PlaybackEvent", "Block_Event", "a") } public Block_Event()     {     return PLUGIN_HANDLED }

doesn't work
__________________

Last edited by raa; 08-03-2007 at 14:37.
raa is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 08-03-2007 , 15:41   Re: No spark on client fire
Reply With Quote #5

Code:
public plugin_init() {     register_forward( FM_PlaybackEvent, "hook_PlaybackEvent" ); } public hook_PlaybackEvent( flags, id, eventindex ) {     if( id == desired_user && eventindex == desired_weaponfiring )         return FMRES_SUPERCEDE;         return FMRES_IGNORED; }

Keep in mind this will block the weapon firing sound as well.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
raa
Senior Member
Join Date: Oct 2005
Old 08-03-2007 , 16:04   Re: No spark on client fire
Reply With Quote #6

K, thanks I'll try that out..

I came up with this..
Code:
public plugin_init()     {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_forward(FM_UpdateClientData, "UpdateClientData_Post", 1); } public client_PreThink(id)     {     if(!is_user_alive(id))         {         return PLUGIN_CONTINUE;     }         if(pev(id, pev_button) & IN_ATTACK)         {         client_print(0, print_chat, "SHOT FIRED");     }         return PLUGIN_CONTINUE; } public UpdateClientData_Post(id, sendweapons, cd_handle)     {     if(!is_user_alive(id))         {         return FMRES_IGNORED;     }         set_cd(cd_handle, CD_ID, 0);         return FMRES_HANDLED; }
I was just about to post asking about the sounds..

can't we put those back in using messages?
__________________

Last edited by raa; 08-03-2007 at 16:07.
raa is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 08-03-2007 , 17:48   Re: No spark on client fire
Reply With Quote #7

You can put them in using emit_sound()

Your code is not the right way to do it, and is not the most efficient way of hooking firing. I hope you know that - maybe you were just showing me what you were using..not sure.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
raa
Senior Member
Join Date: Oct 2005
Old 08-03-2007 , 18:15   Re: No spark on client fire
Reply With Quote #8

I'd have to if else the hell out of that then eh?

also man.. I tried this. and it did not work..

Code:
public plugin_init() {     register_forward( FM_PlaybackEvent, "hook_PlaybackEvent" ); } public hook_PlaybackEvent( flags, id, eventindex ) {     new desired_user, desired_weaponfiring     if( id == desired_user && eventindex == desired_weaponfiring )         return FMRES_SUPERCEDE;         return FMRES_IGNORED; }
__________________

Last edited by raa; 08-03-2007 at 18:21.
raa is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 08-03-2007 , 22:43   Re: No spark on client fire
Reply With Quote #9

That was an example...if you do not know how to code, this is not a plugin you should start with. Use the plugin request forum if you don't know how to do this.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
raa
Senior Member
Join Date: Oct 2005
Old 08-03-2007 , 23:17   Re: No spark on client fire
Reply With Quote #10

thanks for your help.. I'll see if I can figure it out..
__________________

Last edited by raa; 08-03-2007 at 23:22.
raa is offline
Reply


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 10:35.


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