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

Print to chat area...


Post New Thread Reply   
 
Thread Tools Display Modes
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 12-15-2004 , 08:28  
Reply With Quote #31

Quote:
Originally Posted by Fruchtzwerg
Try CON_COMMAND_F with flag FCVAR_GAMEDLL set.
Thank you TONS!!! Fruchtzwerg,
Now im trapping and using the say commands so I will be moving all my
admin commands to say text too ..
You helped me a lot.

Would you know how I can trap user damage and hits etc?

or How I could do TSAY/CSay like messages?

If it cant be done, thats ok, the fact that I can trap and process the
say messages is a great step all by it self.
Thanks Again!!
BeetleFart is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 12-15-2004 , 08:28  
Reply With Quote #32

[Edited]
I hit the back button and it double posted.
BeetleFart is offline
Fruchtzwerg
Member
Join Date: Dec 2004
Old 12-15-2004 , 11:34  
Reply With Quote #33

You get user damage and hits through the FireGameEvent function, its the game event system. Read about it here: http://www.valve-erc.com/srcsdk/Code/ServerPlugins.html

For tsay and csay use the user message HudMsg. Search in the SDK for some examples (UTIL_HudMessage). It will work with HL2MP, but not with CS.
__________________
Fruchtzwerg is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 12-16-2004 , 00:37  
Reply With Quote #34

Quote:
Originally Posted by Fruchtzwerg
You get user damage and hits through the FireGameEvent function, its the game event system. Read about it here: http://www.valve-erc.com/srcsdk/Code/ServerPlugins.html

For tsay and csay use the user message HudMsg. Search in the SDK for some examples (UTIL_HudMessage). It will work with HL2MP, but not with CS.
Im trying to detect when a user dies,via a player_dead trap in this event
so that I can broadcast the chat messages to the correct clients
after trapping the say messages and it doesnt appear to work all the time.
Does anyone know the correct way to detect whether a player is alive or dead?
BeetleFart is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 12-16-2004 , 06:24  
Reply With Quote #35

I believe I got it now, I was looking at the subkey info which was the attacker and not the top key value.. (and I meant player_death event).

If anyone knows a better way to track when someones alive or dead, let me know .
BeetleFart is offline
Fruchtzwerg
Member
Join Date: Dec 2004
Old 12-16-2004 , 06:51  
Reply With Quote #36

It is the best way.
__________________
Fruchtzwerg is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 12-16-2004 , 07:39  
Reply With Quote #37

Anyone been able to do like tsay messages?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 12-17-2004 , 09:58  
Reply With Quote #38

Now that valve added the player_say event, it makes it easy to add say commands....
but is there a way to cancel the say message from being broadcast everyone?

will a DeleteKey or something work in the events to override them?
BeetleFart is offline
Namralkeeg
New Member
Join Date: Dec 2004
Old 12-17-2004 , 13:17  
Reply With Quote #39

Yes, that is a good question. I would also be interested in how to intercept say messages, and not have them broadcast to everyone.
Namralkeeg is offline
Send a message via ICQ to Namralkeeg Send a message via Yahoo to Namralkeeg
Rex Mundi
Junior Member
Join Date: Dec 2004
Old 12-18-2004 , 02:40  
Reply With Quote #40

You could use ::ClientCommand (if we're still talking about plugins here).

Parse the first parameter for "say" or "say_team" if you wish. Then, once caught you can do what you want....PLUGIN_CONTINUE allows the command to carry on and behave as it would normally. PLUGIN_STOP squashes the command there and then and it will not be passed onto all the clients. I'm assuming your aiming for a swearfilter of similar?

The above is also the basis for one of the methods of restricting weapons in CS - parsing for "buy" and then parsing the second parameter for the items.

I suppose you could find a load of addresses and interface into where you're not intended to go, but I find the above much easier myself.
Rex Mundi 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 02:26.


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