25.07.2015, 00:03
Whats the best? I have over 100+ commands with onplayercommand, but I'm not sure if im gonna switch over to zcmd.
Switch over to any command processor that uses 'CallLocalFunction(...)'. The reason why 'strcmp' commands are slow is because it has to validate whether the entered command matches any of the commands on the server.
Trying to execute the last placed command on the callback will have to go through all the commands before it first, and perform a check for every command (strcmp commands). And command processors that call the function (command) directly (CallLocalFunction(...)), goes through the same steps - the only difference between performance is what is allotted in the used command's process. Also, it's 'OnPlayerCommandText(...)', not 'OnPlayerCommand(...)'. |