Count and print all commands
#1

Fixed!
Reply
#2

Its possible
Reply
#3

Nope, it's not.
Reply
#4

Код:
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
Reply
#5

Try the one i provided you
Reply
#6

If You are using ZCMD, Try using this. I didn't test it though.

http://forum.sa-mp.com/showpost.php?...postcount=2961
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)