Count and print all commands - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Count and print all commands (
/showthread.php?tid=632938)
Count and print all commands -
Sc0pion - 22.04.2017
Fixed!
Re: Count and print all commands -
Mohaaaaaaaaaaa - 25.04.2017
Its possible
Re: Count and print all commands -
Logic_ - 25.04.2017
Nope, it's
not.
Re: Count and print all commands -
Mohaaaaaaaaaaa - 25.04.2017
Код:
LoadCommands()
{
new ct = 0; // how many commands are found
CreateAdminLevelGroups();
Iter_Init(CommandsLevel);
foreach(new i : Command())
{
ct ++; // increase count
switch (YHash(Command_GetName(i), false))
{
/*
Example:
I'm releasing a new version with a new command '/crashplayer' and I want it to be for only level 4 admins
So I do this
case _I<crashplayer>:
{
CreateCommandConfig("crashplayer", 4); // Level param is not ignored here (unless the command is already in the database with a level)
}
*/
default:
{
CreateCommandConfig(Command_GetName(i), 0);
// Level param could be ignored unless you you make a NEW ADMIN command in future versions (see example above)
}
}
}
printf("Commands Loaded: %d", ct);
return 1;
}
This is done by a friend
Re: Count and print all commands -
Mohaaaaaaaaaaa - 25.04.2017
Try the one i provided you
Re: Count and print all commands -
DarkSkull - 25.04.2017
If You are using ZCMD, Try using this. I didn't test it though.
http://forum.sa-mp.com/showpost.php?...postcount=2961