Raised This Month: $ Target: $400
 0% 

Unknown command: amx_test


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gamer99
Senior Member
Join Date: Jul 2011
Old 07-23-2011 , 07:35   Unknown command: amx_test
Reply With Quote #1

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
gamer99 is offline
Dr7sTyLe
Senior Member
Join Date: Dec 2010
Old 07-23-2011 , 07:38   Re: Unknown command: amx_test
Reply With Quote #2

Quote:
Originally Posted by gamer99 View Post
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")
Dr7sTyLe is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-23-2011 , 07:52   Re: Unknown command: amx_test
Reply With Quote #3

i have already done

register_concmd("amx_test","cmd_test",ADMIN_K ICK,"<nick or #userid>")
gamer99 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-23-2011 , 07:54   Re: Unknown command: amx_test
Reply With Quote #4

So i think your public cmd_test
is a bug.
Show the error logs.
.Dare Devil. is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-23-2011 , 08:07   Re: Unknown command: amx_test
Reply With Quote #5

there is no bug ..no error ... and the plugin is working fine ...
gamer99 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-23-2011 , 08:10   Re: Unknown command: amx_test
Reply With Quote #6

Try that

register_concmd("amx_test","cmd_test")
.Dare Devil. is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-23-2011 , 08:23   Re: Unknown command: amx_test
Reply With Quote #7

then how I am supposed to check the access ?
gamer99 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-23-2011 , 08:29   Re: Unknown command: amx_test
Reply With Quote #8

Quote:
Originally Posted by gamer99 View Post
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
      
}

.Dare Devil. is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-23-2011 , 08:37   Re: Unknown command: amx_test
Reply With Quote #9

return PLUGIN_HANDLED at the end of your amx_test function.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-23-2011 , 08:44   Re: Unknown command: amx_test
Reply With Quote #10

Quote:
Originally Posted by drekes View Post
return PLUGIN_HANDLED at the end of your amx_test function.
Yeah right
I made a short example...
.Dare Devil. 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 01:11.


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