AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to detect user input? (https://forums.alliedmods.net/showthread.php?t=40474)

xnn 06-28-2006 01:34

How to detect user input?
 
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 :(

v3x 06-28-2006 07:54

Re: How to detect user input?
 
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; }

Throstur 06-28-2006 09:03

Re: How to detect user input?
 
Do hyperlinks work in CS or HL? I wouldnt expect it to, only if you pop up a window.

v3x 06-28-2006 09:04

Re: How to detect user input?
 
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.

xnn 06-28-2006 10:20

Re: How to detect user input?
 
Thanks alot man. I really apreciate it. Works just fine.


All times are GMT -4. The time now is 07:58.

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