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

Problems with register_concmd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
orel56000
Member
Join Date: Apr 2015
Old 06-21-2018 , 08:30   Problems with register_concmd
Reply With Quote #1

I have done this:

Code:
public plugin_init()
{
	register_concmd("amx_orel1", "cmdOrel", ADMIN_KICK, "does nothing");
}

public cmdOrel(id, level, cid)
{
	client_print(0, print_chat, "%i", level);
	return 1;
}
When I write amx_orel in the console it prints me 4 (ADMIN_KICK).

But if I change the command access, it is stuck at the first access I have done:

Code:
public plugin_init()
{
	register_concmd("amx_orel1", "cmdOrel", ADMIN_BAN, "does nothing");
}

public cmdOrel(id, level, cid)
{
	client_print(0, print_chat, "%i", level);
	return 1;
}
prints 4 also...


It is bug or something, or I don't know how to use this command?
orel56000 is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-21-2018 , 08:38   Re: Problems with register_concmd
Reply With Quote #2

Its already registerd in cmdaccess.ini
__________________
stuff
maqi is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-21-2018 , 08:41   Re: Problems with register_concmd
Reply With Quote #3

You know how to use it, but you don't know how AMXX works. Command access is stored in cmdaccess.ini after the plugin's first usage and the flag set in the .sma file has no effect anymore.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
orel56000
Member
Join Date: Apr 2015
Old 06-21-2018 , 08:41   Re: Problems with register_concmd
Reply With Quote #4

Quote:
Originally Posted by maqi View Post
Its already registerd in cmdaccess.ini
So it will be okay if I remove anything from this file? it will be rewriten, no?
orel56000 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 06-21-2018 , 08:42   Re: Problems with register_concmd
Reply With Quote #5

There's no point in removing it since it will reappear again after mapchange. Just change the flag from there, what's the point of editing the plugin and recompiling just for that?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
orel56000
Member
Join Date: Apr 2015
Old 06-21-2018 , 08:45   Re: Problems with register_concmd
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
There's no point in removing it since it will reappear again after mapchange. Just change the flag from there, what's the point of editing the plugin and recompiling just for that?
But basiclly my question is if i remove anything from this file, it will be writen again as the sma says I and there will be no problems? It will be re writen as ADMIN_BAN?
orel56000 is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 06-21-2018 , 08:50   Re: Problems with register_concmd
Reply With Quote #7

It will be rewritten with the default access registered in the plugin.
__________________
stuff
maqi is offline
orel56000
Member
Join Date: Apr 2015
Old 06-21-2018 , 08:53   Re: Problems with register_concmd
Reply With Quote #8

Quote:
Originally Posted by maqi View Post
It will be rewritten with the default access registered in the plugin.
Okay, thanks!!
orel56000 is offline
Reply


Thread Tools
Display Modes

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 11:27.


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