AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help Menu (https://forums.alliedmods.net/showthread.php?t=22793)

Styles 01-04-2006 02:21

Help Menu
 
Is it possible to not allow a register_clcmd to showup in the amx_help? If so please help me out. thanks!

Charr 01-04-2006 08:33

Instead of registering it in plugin_init(), put in client_command(id):
Code:
public client_command(id) {     new cmd[32],arg[32]     read_argv(0,cmd,31)     read_argv(1,arg,31)     if(equali(cmd,"...")) {         ...     }     return PLUGIN_CONTINUE }

Styles 01-04-2006 21:40

Ok guys wait this isant working

Code:
public client_command(id) {     new cmd[32]     read_argv(0,cmd,31)     read_argv(1,pass,31)         if(equali(cmd, "pass")) { //This line has to many errors.      console_print(id,"[Hax0r] ")     }if(equali(cmd,logged_a)){      console_print(id,"[Hax0r] ")       }else if(!equali(cmd, pass)) {       console_print(id, "[Hax0r] ")     }     return PLUGIN_CONTINUE }

Jordan 01-04-2006 22:39

Code:
#include <amxmodx> #include <amxmisc> public client_command(id) {     new cmd[32]     new pass[32]     read_argv(0,cmd,31)     read_argv(1,pass,31)         if(equali(cmd, "pass")) { //This line has to many errors.      console_print(id,"[Hax0r] ")     }if(equali(cmd,logged_a)){      console_print(id,"[Hax0r] ")         }else if(!equali(cmd, pass)) {       console_print(id, "[Hax0r] ")     }     return PLUGIN_CONTINUE }

I don't know what logged_a is so I can't really help you with that...

All the errors are fixed except for logged_a o.O

Styles 01-04-2006 23:09

Ok heres what i want
a command

amx_secretlogin <PASSWORD>
--I dont want it to be shown in amx_help--

How do you do that? I dont understand

ShAyA 01-04-2006 23:52

Make the command only seeable by Admins:

register_concmd("command","pluginMethod",ADMI N_KICK,"whatever")

If its suppose to only be used by admins.

or register_clcmd("say", "pluginMethod")

and then read_argv etc.

teame06 01-05-2006 00:09

http://forums.alliedmods.net/showthr...p?t=21280+help

You have to modify the adminhelp.sma

It been done here.. Follow that link to know how.

Styles 01-05-2006 14:20

You dont get it. Im trying to make a plugin where the command to type in console is secret and doesnt show in amx_help.

so you type amx_helper <Name> Gives you w/e.

Charr 01-05-2006 14:48

You can either changed adminhelp.sma to skip your command, or you can use client_command. In your case, I would recommend that you use client_command.
When you use equali, you compare two arrayed varibles. If you are comparing it to a constant expersion (something that remains the same all the time, you need to put it in quotes.
This is wrong:
Code:
if(equali(cmd,password))
ERROR: Undefined symbol 'password'

This is correct:
Code:
if(equali(cmd,"password"))


All times are GMT -4. The time now is 16:02.

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