Raised This Month: $32 Target: $400
 8% 

How to Hook in EmptyServerPlugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CoolPeter
Member
Join Date: Nov 2005
Old 11-24-2005 , 13:21   How to Hook in EmptyServerPlugin
Reply With Quote #1

Hello,

iam testing a little bit with the EmptyServerPlugin for 2 days...

i want to hook the say command.

if the player say "Test" then it should not show up in the chat.
but other messages still show up in the chat.

i searched for this...

http://www.hl2coding.com/forums/viewtopic.php?t=697
http://forums.alliedmods.net/showthread.php?t=37058

but i cant get one of these to work in my emptyserverplugin

maybe someone can help me out...

and sry about my english
CoolPeter is offline
jeanlepail
Member
Join Date: Nov 2005
Location: Paris France
Old 11-25-2005 , 09:49  
Reply With Quote #2

in FireGameEvents :

if(FStrEq(name, "player_say")
__________________
TK's Management : Finish
Bet Plugin : 90 %
jeanlepail is offline
Send a message via AIM to jeanlepail Send a message via MSN to jeanlepail
CoolPeter
Member
Join Date: Nov 2005
Old 11-25-2005 , 12:38  
Reply With Quote #3

there u cant stop the say command...
i know i have to hook the ConCommand, but i dont know how to implant that in the emptyserverplugin...
CoolPeter is offline
jeanlepail
Member
Join Date: Nov 2005
Location: Paris France
Old 11-26-2005 , 11:26  
Reply With Quote #4

listen

if(FStrEq(name ,"player_say")) // On a player say
{
FStrEq(event->GetString("Text"), "test")) // if the text = test
{
pEntity = getindexbyuserid(event->GetInt("userid");
ClientCommand(pEntity," CONVAR "); // make the client exec the fonction we want
}
}




the player say composition

"player_say" {
userid int
text char *
priority int
}
__________________
TK's Management : Finish
Bet Plugin : 90 %
jeanlepail is offline
Send a message via AIM to jeanlepail Send a message via MSN to jeanlepail
CoolPeter
Member
Join Date: Nov 2005
Old 11-26-2005 , 12:58  
Reply With Quote #5

i know that, but there i cant stop the message that a player has said...
CoolPeter is offline
jeanlepail
Member
Join Date: Nov 2005
Location: Paris France
Old 11-26-2005 , 15:56  
Reply With Quote #6

wrong !

event->SetString(text,"");
or event->SetInt(userid,"");
.......
__________________
TK's Management : Finish
Bet Plugin : 90 %
jeanlepail is offline
Send a message via AIM to jeanlepail Send a message via MSN to jeanlepail
CoolPeter
Member
Join Date: Nov 2005
Old 11-26-2005 , 18:00  
Reply With Quote #7

that doesn't work
CoolPeter is offline
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 11-27-2005 , 00:07  
Reply With Quote #8

I would say use SourceMM if you plan on hooking anything.
__________________
sslice is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 11-27-2005 , 07:48  
Reply With Quote #9

check this thread:
http://forums.alliedmods.net/showthread.php?t=37058
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
CoolPeter
Member
Join Date: Nov 2005
Old 11-29-2005 , 21:09  
Reply With Quote #10

thx, works great
CoolPeter 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 23:31.


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