[Include] Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)
#21

It is actually a tad slower in a way:
Код:
[Without Callbacks]

This Include:

644
649
640
649
650

Command Processor:

605
604
606
608
609

[With Callbacks]

This Include:

660
662
671
672
660

Command Processor:

644
637
645
635
640

Go to the other command processor's thread for the code used here.
I don't really have time to add tons of features like you did here (it's pretty sick, I give you that! +8 rep!), but for the time being, I see no need if it can top off others in a way.
Reply
#22

I don't know why are you obssessed with speed, imagine this situation:

Your server has 1000/1000 players, all your players have 10 ms ping (which is almost super improbable), now your command processors process 100,000 in 600ms, that means 1000 of them (everyone entering a CMD at same time) take roughly 6 ms, thats still less than the player's response time, Why don't you focus on what the community lacks instead of what we have and are satisfied with?
Reply
#23

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
I don't know why are you obssessed with speed, imagine this situation:

Your server has 1000/1000 players, all your players have 10 ms ping (which is almost super improbable), now your command processors process 100,000 in 600ms, that means 1000 of them (everyone entering a CMD at same time) take roughly 6 ms, thats still less than the player's response time, Why don't you focus on what the community lacks instead of what we have and are satisfied with?
It honestly doesn't matter who thinks what about speed. The users just want to know the speed, we provide it with a comparison for perspective, like "this is slower than this one but faster than this one" or "this one has these features and these ones do/don't". It's not a competition, it's work, fun, and useful.
Reply
#24

And maybe add the parameter "help" like the ycmds?
Reply
#25

Quote:
Originally Posted by PT
Посмотреть сообщение
And maybe add the parameter "help" like the ycmds?
But perhaps not call it "help", but "mode", 0 being the regular command mode where the command would normally execute normally. Like CMD_MODE_DEFAULT, CMD_MODE_INFO, or CMD_MODE_PARAMS.

Then obviously a "mode" parameter in the emulating functions.
Reply
#26

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
I don't know why are you obssessed with speed, imagine this situation:

Your server has 1000/1000 players, all your players have 10 ms ping (which is almost super improbable), now your command processors process 100,000 in 600ms, that means 1000 of them (everyone entering a CMD at same time) take roughly 6 ms, thats still less than the player's response time, Why don't you focus on what the community lacks instead of what we have and are satisfied with?
This include nor iZCMD was about performance but it appeared like I was competing with other includes when iZCMD was released (because people started questioning about the performance and everybody got weary about it).

It is natural for someone to ask if this include, with these many features, is good performance wise. You can add these features to dcmd and make it 1000 times slower.

The performance benchmarks are there just to let you know that this isn't terrible when it comes to performance with these many features.
Reply
#27

Quote:
Originally Posted by Yashas
Посмотреть сообщение
This include nor iZCMD was about performance but it appeared like I was competing with other includes when iZCMD was released (because people started questioning about the performance and everybody got weary about it).

It is natural for someone to ask if this include, with these many features, is good performance wise. You can add these features to dcmd too and make it 1000 times slower.

The performance benchmarks are there just to let you know that this isn't terrible when it comes to performance with these many features.
I am agree with this statement. But, first you release IZCMD on basis of fast processing. Now people see your name and they guess that all of your release will be more faster and will be based on fast processing not about your features.
Reply
#28

Quote:
Originally Posted by Crayder
Посмотреть сообщение
It honestly doesn't matter who thinks what about speed. The users just want to know the speed, we provide it with a comparison for perspective, like "this is slower than this one but faster than this one" or "this one has these features and these ones do/don't". It's not a competition, it's work, fun, and useful.
Yeah thats my point, these are supposed to be fun and useful, but lately everyone is obssessed with getting their include faster than others rather than adding actual useful features, we are way past days of dini and dcmd, speed difference between two are negligible so we should be focusing on features. but yet current active include developers still keep on having a childish competition of being faster by a margin of 50 ms in 100,000 cmds which means <1ms difference in runtime usage of servers.

Quote:
Originally Posted by Yashas
Посмотреть сообщение
This include nor iZCMD was about performance but it appeared like I was competing with other includes when iZCMD was released (because people started questioning about the performance and everybody got weary about it).

It is natural for someone to ask if this include, with these many features, is good performance wise. You can add these features to dcmd and make it 1000 times slower.

The performance benchmarks are there just to let you know that this isn't terrible when it comes to performance with these many features.
Yes, it is important for people to know if performance is decent, but just randomly updating things to get 10 ms less than the other include is just purely childish, SickAttack does it way way more, but you also are.
Reply
#29

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
Yes, it is important for people to know if performance is decent, but just randomly updating things to get 10 ms less than the other include is just purely childish, SickAttack does it way way more, but you also are.
I am sorry if that is how things are being looked at. I had no intentions to outrun SickAttack's include. In fact, initially, I thought his was still much faster because of the ridiculous optimizations he had done but it turned out they are pretty close. So close that we both get different results with out speed tests.

You will of course find me making comments about optimizations and whenever I make, I ensure that they aren't silly. Even though the optimizations are negligible, it doesn't mean you shouldn't optimize at all. If I really worried about beating SickAttack's include performance wise, I would have done what he had done in his include.

You may ask Crayder, I had already told him before releasing this include that I feel like an idiot to compete with other command processors.
Reply
#30

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
Yeah thats my point, these are supposed to be fun and useful, but lately everyone is obssessed with getting their include faster than others rather than adding actual useful features, we are way past days of dini and dcmd, speed difference between two are negligible so we should be focusing on features. but yet current active include developers still keep on having a childish competition of being faster by a margin of 50 ms in 100,000 cmds which means <1ms difference in runtime usage of servers.



Yes, it is important for people to know if performance is decent, but just randomly updating things to get 10 ms less than the other include is just purely childish, SickAttack does it way way more, but you also are.
I'm not really worried about adding features to it at the moment, probably until something is done about innocent players getting banned from literally every server (which probably isn't going to happen for a long, long while). Because like I have so little to no hope, that all the effort which will be put in to it will go to any good production use. For that reason, if I keep it simple no-one will use it if it is (omg, that looks weird) slower than others with no features than its actual purpose.

The include originated due to an error you would get if you load CrashDetect and use an out of bounds command in ZCMD, making it faster than others is the only reason for it to remain simple. I actually never had any intentions in adding a bunch of features to it after releasing it - get it done > get it out there > move on to something else.

If anyone wants a competition or a challenge, I will try to give them that; otherwise, that release becomes obsolete to others. I can't really play on any server according to my liking, that's without getting banned for invalid reasons. Nor can I have a server open these days, for countless of reasons (don't judge without knowing them). So like this can probably benefit my knowledge, and keep me entertained once in a while. At least at the end of the day, I get something worthwhile, rather than bullshit from people trying to be administrators.

I'm not whining about there not being updates, I really don't see a need for any new things, just bug fixes. But let's just say I'm tired of the messy chaos that goes on in-game, there's literally no point in me joining any servers unless I'm the owner, because being the owner gives me some immunity, but yet I get accused for hacking literally every session even though I'm the owner. So sad.
Reply
#31

Nice release, will definitely try it.
Reply
#32

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
I get accused for hacking literally every session even though I'm the owner. So sad.
Yeah, trust me if you are getting banned from everywhere you are not innocent, I've seen nuff of "your kind" always saying they are innocent while they test out new cheats before they even get released.

Includes are sorted by their usefulness, they come in competition by being useful and they occasionally get thrown out of it because of being slow, but mostly the challange is giving as many features as you can to people, while keeping them unique, people don't need 15 iostream libraries for C++, they need new ones, unique ones, areas I've never seen you even try.
Still, I guess thats your idea of challenge and mindstream, so I won't start a war on this, but I hope this comment makes you think about what you contribute to community, and hopefully change it for the better.
Reply
#33

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
Yeah, trust me if you are getting banned from everywhere you are not innocent, I've seen nuff of "your kind" always saying they are innocent while they test out new cheats before they even get released.

Includes are sorted by their usefulness, they come in competition by being useful and they occasionally get thrown out of it because of being slow, but mostly the challange is giving as many features as you can to people, while keeping them unique, people don't need 15 iostream libraries for C++, they need new ones, unique ones, areas I've never seen you even try.
Still, I guess thats your idea of challenge and mindstream, so I won't start a war on this, but I hope this comment makes you think about what you contribute to community, and hopefully change it for the better.
I don't use cheats, always a stock game, not even kidding. I'm probably one of the most honest members here. Nor do you contribute anything to this community, so yeah... I don't have time to be working all day on things for people to use, and get all the credit from with downloaded scripts. Look where Pottus is now due to ColAndreas, you see something big coming, then it goes south.

I just release things that I create for projects, or see the need of, in a way. Or when newbies join, help for a few weeks, and call all the oldies shitposters as they just often post in the Everything and Nothing section.

You made me laugh though, I must be really good at the game then!
Reply
#34

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
I don't use cheats, always a stock game, not even kidding. I'm probably one of the most honest members here. Nor do you contribute anything to this community, so yeah... I don't have time to be working all day on things for people to use, and get all the credit from with downloaded scripts. Look where Pottus is now due to ColAndreas, you see something big coming, then it goes south.

I just release things that I create for projects, or see the need of, in a way. Or when newbies join, help for a few weeks, and call all the oldies shitposters as they just often post in the Everything and Nothing section.

You made me laugh though, I must be really good at the game then!
I do not contribute to this community because I haven't found an actual thing worth developing, nor do I ever bother with small things like getting 0.0003 ms faster than pawn.cmd, keep thinking you are good at it, if thats what gets you to sleep at nights

ColAndreas is one of the greatest plugins around, and I've created so many beautiful and nice things with it so far, I don't see what you are getting at with that example, maybe you are just terrible at understanding how it functions and haven't made it work yet, idk.
Reply
#35

Who gives a shit how fast it is the feature rich part is what really counts here. As for ColAndreas yes it goes South, North, East, West and every direction in between. The only people using it actually know what they are doing with it and I am not the only person who worked on it. My part in ColAndreas wouldn't even count as 50 percent of the development work done.

You know what SickAttack there is so much that goes into major releases it takes a lot of time patience and vision to achieve. I still have some great idea for SA-MP that I simply don't have time to really work on but I will list them out.

- Update FCNPC to load playback sequences that can be translated to any angle/position (Think climbing walls / custom attack sequences etc)
- A new generation in mapping tools that goes beyond Texture Studio allowing for the creation of Dynamic elements (lifts / doors etc / Pickups / 3d text etc)
- An advanced GUI system look at Texture Studio (prototype GUI include)
- Advanced world knowledge (Detecting roads / grass / rock) etc

There is so much I won't get to do but I still got a lot of ideas.
Reply
#36

I'm talking about, that here when big projects are given a lot of support, updates, and so on, that often leads to the authors going south. Keep moving on to different things in the same platform is a much better option, and it's more productive.

There are a lot of samples in this case. But not really the main point.

But seriously, how did you come to that conclusion... lol

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
I do not contribute to this community because I haven't found an actual thing worth developing, nor do I ever bother with small things like getting 0.0003 ms faster than pawn.cmd, keep thinking you are good at it, if thats what gets you to sleep at nights
Well, how creative are you! Congratulations for all you have done, we appreciate it :/

------------------

But like on a serious note. My intention was never to add a bunch of stuff to it, that can be done by the scripters in their own way, inside their gamemodes if they want (simulating flags and all that). I pretty much don't really care anymore, servers lack at a more major aspect that none of its core actually matters. At least for the time being.

It's meant to be simple, and equally or faster than others. Otherwise, there's no point in keeping it simple if others are faster and have more features... No-one will use it then... So yeah, understand the point?
Reply
#37

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
It's meant to be simple, and equally or faster than others. Otherwise, there's no point in keeping it simple if others are faster and have more features... No-one will use it then... So yeah, understand the point?
Lol, VERY great point... Props to this. Have this rep...
Reply
#38

Quote:
Originally Posted by PT
Посмотреть сообщение
And maybe add the parameter "help" like the ycmds?
Код:
CMD:ban(cmdid, playerid, params[]) <cmdState:normal>
{
     //...
}
CMD:ban(cmdid, playerid, params[]) <cmdState:help>
        return SendClientMessage(playerid, YELLOW, "Bans the player");

CMD:help(cmdid, playerid, params[])
{
      state cmdState:help;
      EmulateCommandEx(GetCommandID(params), playerid, "");
      state cmdState:normal;
      return CMD_SUCCESS;
}
This works because the PAWN compiler silently converts the copies of the functions into one by adding a switch. This is exactly how y_commands help works except for the help variable.

I will try to integrate automata into this include.

Код:
CMD<ACMD>:ban(cmdid, playerid, params[]) { //ban code }
CMD<ACMD>:ban[help](cmdid, playerid, params[]) return SendClientMessage(playerid, YELLOW, "Bans the player");
CMD<ACMD>:ban[params](cmdid, playerid, params[]) return SendClientMessage(playerid, YELLOW, "[playerid/name] [reason]");
EDIT: I think it is not possible.
EDIT2: It is possible.
Reply
#39

As we established in a PM conversation, having 0 as the default command flag causes some issues when it comes to checking whether it's an admin command or not. Having it as anything else but 0 seems to works to a certain extent.

I did some further testing and it seems like the default command flag isn't included in commands with flags. The following command can be executed by players but not by administrators:
PHP код:
command(commandscmdidplayeridparams[]) {
    new 
cmdList[512], bool:need_frmt true;
    if(
need_frmt) {
        for(new 
GetTotalCommandCount(); -->= 0;) {
            if(
== cmdid)
                continue;
            if(
GetCommandFlags(i) == 0) {
                new 
cmd[28];
                
GetCommandName(icmd);
                
strcat(cmdListcmd);
                
strcat(cmdList"\n");
            }
        }
        
need_frmt false;
    }
    
Dialog_Show(playeridadmin_commandsDIALOG_STYLE_LISTCOMMUNITY_NAME" - Commands"cmdList"Select""Cancel");
    return 
CMD_SUCCESS;

Probably worth noting that I'm using the following method of checking for admin commands:
PHP код:
public OnPlayerCommandReceived(cmdidplayeridcmdtext[]) {
    new const 
acmdFlags[7] = {CMD_FLAG_PLAYERACMD_LEVEL_MIN_1ACMD_LEVEL_MIN_2ACMD_LEVEL_MIN_3ACMD_LEVEL_MIN_4ACMD_LEVEL_MIN_5ACMD_LEVEL_MIN_DEV};
    if(
cmdid == INVALID_COMMAND_ID) {
        
Player_SendTaggedMessage(playeridTYPE_ERROR"The specified command does not exist! Use /cmds to see all available commands.");
        return 
CMD_FAILURE;
    }
    
printf("Flags:%b AdminLevel:%d AdminFlag:%b"GetCommandFlags(cmdid), Player[playerid][epd_Admin], acmdFlags[Player[playerid][epd_Admin]]);
    
//if(GetCommandFlags(cmdid) != 0 || acmdFlags[Player[playerid][epd_Admin]] != 0) {
    
if(!(GetCommandFlags(cmdid) & acmdFlags[Player[playerid][epd_Admin]])) {
        
Player_SendTaggedMessage(playeridTYPE_ERROR"The specified command is reserved for administrative players.");
        return 
CMD_FAILURE;
    }
    
//}
    
return CMD_SUCCESS;

While the extra check (commented in the code above) works as it should, I wanted to make the default command flag work without needing an extra check. For that, I defined DEFAULT_CMD_FLAG as:
PHP код:
#define CMD_DEFAULT_FLAG    (0b00000000000000000000000000000010)
#include <smartcmd>         // Credits to Yashas        (https://sampforum.blast.hk/showthread.php?tid=619862
I could include my data module first and then use the enumerator CMD_FLAG_PLAYER instead of redeclaring it there:
PHP код:
enum (<<= 1) {
    
CMD_FLAG_ADMIN 1,
    
CMD_FLAG_PLAYER,
    
ACMD_LEVEL_1,
    
ACMD_LEVEL_2,
    
ACMD_LEVEL_3,
    
ACMD_LEVEL_4,
    
ACMD_LEVEL_5,
    
ACMD_LEVEL_DEV
};
#define ACMD_LEVEL_MIN_DEV  ACMD_LEVEL_DEV
#define ACMD_LEVEL_MIN_5    ACMD_LEVEL_5 | ACMD_LEVEL_MIN_DEV
#define ACMD_LEVEL_MIN_4    ACMD_LEVEL_4 | ACMD_LEVEL_MIN_5
#define ACMD_LEVEL_MIN_3    ACMD_LEVEL_3 | ACMD_LEVEL_MIN_4
#define ACMD_LEVEL_MIN_2    ACMD_LEVEL_2 | ACMD_LEVEL_MIN_3
#define ACMD_LEVEL_MIN_1    ACMD_LEVEL_1 | ACMD_LEVEL_MIN_2 
Is it possible to include the default CMD flag in every single command? The only reason why flags are used is to add an extra layer of permissions to a command or am I wrong on that?

While I'm at it, I seem to have another issue with this method of checking. Administrators can utilise commands that are above their rank.

Little sidenote: there's a little typo in one of the examples:
Код:
enum (<<=1)
{
    VIP_CMD = 1,
    RCON_CMD,
    PLAYER_CMD.
    ACMD1,
    ACMD2,
    ACMD3,
    ACMD4,
    ACMD5
}
Reply
#40

AndySedeyn, you're not checking it right. You should get the admin bit range from the command flags. If that's not zero then it's an admin command.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)