AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Unknown command: amx_test (https://forums.alliedmods.net/showthread.php?t=162806)

gamer99 07-23-2011 07:35

Unknown command: amx_test
 
Hello all ,

I have created one command amx_test and when player is using it through console its coming

Unknown command: amx_test

But the command is working fine . How to supress it / if the user does nto have the access how to print "You do not have access to use this command "

TY ,

Gamer99

Dr7sTyLe 07-23-2011 07:38

Re: Unknown command: amx_test
 
Quote:

Originally Posted by gamer99 (Post 1516597)
Hello all ,

I have created one command amx_test and when player is using it through console its coming

Unknown command: amx_test

But the command is working fine . How to supress it / if the user does nto have the access how to print "You do not have access to use this command "

TY ,

Gamer99

register_concmd("amx_test","something")

gamer99 07-23-2011 07:52

Re: Unknown command: amx_test
 
i have already done

register_concmd("amx_test","cmd_test",ADMIN_K ICK,"<nick or #userid>")

.Dare Devil. 07-23-2011 07:54

Re: Unknown command: amx_test
 
So i think your public cmd_test
is a bug.
Show the error logs.

gamer99 07-23-2011 08:07

Re: Unknown command: amx_test
 
there is no bug ..no error ... and the plugin is working fine ...

.Dare Devil. 07-23-2011 08:10

Re: Unknown command: amx_test
 
Try that

register_concmd("amx_test","cmd_test")

gamer99 07-23-2011 08:23

Re: Unknown command: amx_test
 
then how I am supposed to check the access ?

.Dare Devil. 07-23-2011 08:29

Re: Unknown command: amx_test
 
Quote:

Originally Posted by gamer99 (Post 1516628)
then how I am supposed to check the access ?

#define ACCESSMENU ADMIN_KICK


PHP Code:

public yourcmd
{
      if(
get_user_flags(id) & ACCESSMENU)
      {
                
//your code
      
}



drekes 07-23-2011 08:37

Re: Unknown command: amx_test
 
return PLUGIN_HANDLED at the end of your amx_test function.

.Dare Devil. 07-23-2011 08:44

Re: Unknown command: amx_test
 
Quote:

Originally Posted by drekes (Post 1516637)
return PLUGIN_HANDLED at the end of your amx_test function.

Yeah right :)
I made a short example...


All times are GMT -4. The time now is 01:11.

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