Raised This Month: $ Target: $400
 0% 

HandleSay and stuff


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 04-03-2006 , 00:05   HandleSay and stuff
Reply With Quote #1

I know how to do the HandleSay with containi statements, but not equali statements. The whole chat system isn't functioning now!

Code:
public HandleSay(id) {     new Speech[192];     read_args(Speech,191)     remove_quotes(Speech)             if(equali(Speech, "/Test"))     {         client_print(id,print_chat, "[Gaben] Testage.");         return PLUGIN_HANDLED;     }    return PLUGIN_HANDLED; }

I've also tried
Code:
if(equali(Speech, "/test") != -1)
But all that does is make anything you say, do that function... The chat system is still defiled anyhow.

Edit: There are no errors what so ever.
__________________
LEWL.
NewUser is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 04-03-2006 , 00:22  
Reply With Quote #2

if you return plugin_handled it cancels the chat that the plugin was looking at. Since the only thing you return is plugin_handled you are canceling all the chat.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
capndurk
Senior Member
Join Date: Feb 2006
Old 04-03-2006 , 00:23  
Reply With Quote #3

Post your whole code, and does it print anything?
__________________
I have left these forums because a certain respected member has been acting immaturely lately and has decided that I am not welcome in this community.
capndurk is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-03-2006 , 00:48  
Reply With Quote #4

Code:
return PLUGIN_CONTINUE;
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
capndurk
Senior Member
Join Date: Feb 2006
Old 04-03-2006 , 00:53  
Reply With Quote #5

Quote:
Originally Posted by v3x
Code:
return PLUGIN_CONTINUE;
I thought if you just returned PLUGIN_HANDLED in that type of function it would execute the commands before it, and not print the text that the user typed in, and if you returned CONTINUE, it would both execute the commands and print the text... Does it not execute the commands if you return HANDLED?
__________________
I have left these forums because a certain respected member has been acting immaturely lately and has decided that I am not welcome in this community.
capndurk is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-03-2006 , 01:23  
Reply With Quote #6

He has "return PLUGIN_HANDLED" as the last return in that function so server chat would be totally disabled. Using my suggestion would fix this problem.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
capndurk
Senior Member
Join Date: Feb 2006
Old 04-03-2006 , 01:33  
Reply With Quote #7

Quote:
Originally Posted by v3x
He has "return PLUGIN_HANDLED" as the last return in that function so server chat would be totally disabled. Using my suggestion would fix this problem.
oh, okay
__________________
I have left these forums because a certain respected member has been acting immaturely lately and has decided that I am not welcome in this community.
capndurk 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 16:40.


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