![]() |
#21 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Feb 2012
Posts: 1,028
Reputation: 84
|
![]()
Great job! I hope that you will keep updating it - and it would be cool if someone posts a benchmark with ZCMD, YCMD and iZCMD and maybe other command processors.
|
![]() |
![]() |
![]() |
#22 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,853
Reputation: 610
|
![]()
There is no need for any of those benchmarks, any plugin processor like this and MCMD knock out any PAWN processor without doubt by miles.
|
![]() |
![]() |
![]() |
#23 | |
Big Clucker
![]() ![]() Join Date: Apr 2016
Posts: 120
Reputation: 236
|
![]() Quote:
PHP Code:
|
|
![]() |
![]() |
![]() |
#24 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,853
Reputation: 610
|
![]()
That would require very slow code, like strcmp. Using many strcmp cases could make Pawn.CMD slower than any other processor.
|
![]() |
![]() |
![]() |
#25 |
Big Clucker
![]() ![]() Join Date: Apr 2016
Posts: 120
Reputation: 236
|
![]() PHP Code:
|
![]() |
![]() |
![]() |
#26 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,853
Reputation: 610
|
![]()
That would have to be placed in every command I want blocked.
Also, do you realize how slow if statements are? Another thing to slow us down. |
![]() |
![]() |
![]() |
#27 |
Big Clucker
![]() ![]() Join Date: Apr 2016
Posts: 120
Reputation: 236
|
![]() |
![]() |
![]() |
![]() |
#28 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Jun 2012
Location: India
Posts: 878
Reputation: 313
|
![]()
Its here,
http://forum.sa-mp.com/showthread.ph...95#post3475795 Try to keep the syntax same so that people can easily switch. You are beating other plugin based command processors because you have lesser features. Other processors have two callbacks. You should have one callback before executing the command and one callback after executing the command. |
![]() |
![]() |
![]() |
#29 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2011
Posts: 658
Reputation: 15
|
![]()
Maybe something like this
Code:
CMD:command(playerid, params[], cmd_id) Code:
public OnPlayerReceivedCommand(playerid, cmd_id, params[], bool:exists) { switch(cmd_id) { // CODE GOES HERE } } |
![]() |
![]() |
![]() |
#30 | |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,853
Reputation: 610
|
![]() Quote:
Here's what I had in mind. - Not ignoring the return value of commands: Allow commands to return whatever integer the scripter wants. Returning '0' would result in the default actions, the unknown command stuff. You could also add a new parameter to the callback, a 'result'. The 'result' parameter would hold the value returned by the command. - Add a function for disabling/enabling specific commands for specific players. SetPlayerCommandAllowed or something similiar, parameters: (playerid, cmdname[], bool:allow) Setting 'allow' to false would return '0' if the player used this command, otherwise the command would execute. Or, you could add yet another parameter to the callback, 'bool:allowed'. You would set this to the value set by the scripter. Then we could easily handle what happens when a player used a command they aren't allowed to use. pawn Code:
Doing it this way would keep the speed minimal still, and make the scripters' lives easier. |
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] Vectoral Pawn - STL Data containers for pawn | Rancho | Plugin Development | 70 | 03/05/2017 08:41 PM |
Forum bug with [pawn][/pawn] BBCODE | Yuripe | Everything and Nothing | 4 | 06/10/2012 01:58 PM |
[Tool/Web/Other] PAWN Scanner - Scan PAWN files for information. | Slice | Tools and Files | 10 | 15/07/2012 08:09 PM |
[Help With Pawn] Pawn and compiler is not working..... | D_Less | Client Support | 3 | 09/03/2012 05:49 AM |