AlliedModders

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

CrazY. 10-13-2018 11:55

get_clcmdsnum
 
Hello, I noticed that get_clcmdsnum doesn't return the total amount of registered commands. Not sure, but maybe due the third parameter of register_clcmd (flags=-1) or I'm doing something wrong. Anyway, is there no forward that is called when a command is registered or way to fix that problem?

Code:
new iMaxSize = get_clcmdsnum(ADMIN_ALL); for (new i = 0; i < iMaxSize; i++) // something

E1_531G 10-13-2018 12:12

Re: get_clcmdsnum
 
You are right about flags = -1.
https://github.com/alliedmodders/amx...pp#L1618-L1629
Cmds with flags = -1 are not listable.

CrazY. 10-13-2018 12:33

Re: get_clcmdsnum
 
This could be fixed in the current version of amxx or at least make 0 as an default instead of -1 in amxmodx.inc.


All times are GMT -4. The time now is 17:35.

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