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

How to detect user input?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xnn
Junior Member
Join Date: Jun 2006
Old 06-28-2006 , 01:34   How to detect user input?
Reply With Quote #1

Hello. I want to detect if a user says "/rank" and give him a message to go to a specific web page. How can I do that? I tried something, but didn't work
xnn is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-28-2006 , 07:54   Re: How to detect user input?
Reply With Quote #2

You can either a) modify the stats source code or b) use this code and put it above any stats plugins in plugins.ini if you're using any:

Code:
#include <amxmodx> public plugin_init() {   register_plugin("test" , "0.1" , "v3x");   register_clcmd("say /rank" , "cmd_sayrank"); } public cmd_sayrank(id) {   client_print(id , print_chat , "* Go to <a href="http://www.blah.com" target="_blank" rel="nofollow noopener">www.blah.com</a> for rank info");   return PLUGIN_HANDLED; }
__________________
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
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 06-28-2006 , 09:03   Re: How to detect user input?
Reply With Quote #3

Do hyperlinks work in CS or HL? I wouldnt expect it to, only if you pop up a window.
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-28-2006 , 09:04   Re: How to detect user input?
Reply With Quote #4

Quote:
Originally Posted by Throstur
Do hyperlinks work in CS or HL? I wouldnt expect it to, only if you pop up a window.
The forum code did that, not me.
__________________
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
xnn
Junior Member
Join Date: Jun 2006
Old 06-28-2006 , 10:20   Re: How to detect user input?
Reply With Quote #5

Thanks alot man. I really apreciate it. Works just fine.
xnn 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 20:42.


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