25.07.2015, 00:32
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(...)'.
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(...)'.