SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 01/06/2016, 11:43 PM   #21
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,836
Reputation: 565
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by vannesenn View Post
I don't play SA-MP anymore like before two-three years. I visit this form maybe twice a day, not a lot. I'm more active on ZB SA-MP(SA-MP forum for West Balcan). I don't remember I saw urShadow's topic in plugin forum/bord. Sorry, but his current name looks like big troll
urShadow has been here way longer than "two-three" years... Now off of that subject... :P

@YourShadow Can you let us have some more features like:
- Not ignoring the return value, so we can hide commands
- Disabling commands for certain players, which would return 0 for them
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 02/06/2016, 01:37 AM   #22
Stanford
High-roller
 
Stanford's Avatar
 
Join Date: Feb 2012
Posts: 1,037
Reputation: 84
Default Re: Pawn.CMD - the fastest and most functional command processor

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.
__________________
Y_Less: "That code compiles perfectly, but I can tell you now it won't make me a cup of tea."

Y_Less: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. They don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side."
Stanford is offline   Reply With Quote
Old 02/06/2016, 01:44 AM   #23
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,836
Reputation: 565
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Stanford View Post
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.
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.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 02/06/2016, 06:06 AM   #24
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 106
Reputation: 151
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Crayder View Post
@YourShadow Can you let us have some more features like:
- Not ignoring the return value, so we can hide commands
- Disabling commands for certain players, which would return 0 for them
PHP Code:
public OnPlayerReceivedCommand(playeridcmd[], params[], bool:exists

    if (
playerid ...) // condition
    

        
SendClientMessage(playerid0xFFFFFFFF"This command not available for you"); 

        return 
0// will not call "cmd: ..."
    


    return 
1

YourShadow is offline   Reply With Quote
Old 02/06/2016, 06:45 AM   #25
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,836
Reputation: 565
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by YourShadow View Post
PHP Code:
public OnPlayerReceivedCommand(playeridcmd[], params[], bool:exists

    if (
playerid ...) // condition
    

        
SendClientMessage(playerid0xFFFFFFFF"This command not available for you"); 

        return 
0// will not call "cmd: ..."
    


    return 
1

That would require very slow code, like strcmp. Using many strcmp cases could make Pawn.CMD slower than any other processor.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 02/06/2016, 07:04 AM   #26
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 106
Reputation: 151
Default Re: Pawn.CMD - the fastest and most functional command processor

PHP Code:
cmd:ban(playeridparams[])
{
    if (
pAdmin[playerid] == 0// condition
    
{
        
SendClientMessage(playerid0xFFFFFFFF"This command not available for you");

        return; 
// exit from function
    
}
    
    
// code here

YourShadow is offline   Reply With Quote
Old 02/06/2016, 07:28 AM   #27
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,836
Reputation: 565
Default Re: Pawn.CMD - the fastest and most functional command processor

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.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 02/06/2016, 07:40 AM   #28
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 106
Reputation: 151
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Crayder View Post
@YourShadow Can you let us have some more features like:
- Not ignoring the return value, so we can hide commands
- Disabling commands for certain players, which would return 0 for them
Show me an example of how you would like it to see.
YourShadow is offline   Reply With Quote
Old 02/06/2016, 08:31 AM   #29
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 873
Reputation: 263
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by YourShadow View Post
Show me an example of how you would like it to see.
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.
Yashas is offline   Reply With Quote
Old 02/06/2016, 08:54 AM   #30
vannesenn
Gangsta
 
vannesenn's Avatar
 
Join Date: Feb 2011
Posts: 663
Reputation: 15
Default Re: Pawn.CMD - the fastest and most functional command processor

Maybe something like this

Code:
CMD:command(playerid, params[], cmd_id)
. cmd_id is unique command ID(like dialogid for dialogs). And then

Code:
public OnPlayerReceivedCommand(playerid, cmd_id, params[], bool:exists)
{
    switch(cmd_id)
    {
         // CODE GOES HERE
    }

}
vannesenn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [I-ZCMD]Improved ZCMD - Fastest Command Processor Yashas Includes 99 23/07/2017 04:23 PM
[Tutorial] PAWN Pre-Processor (Updated 22/04/13) Misiur Tutorials 6 10/07/2016 02:33 PM
[Include] y_commands - Most flexible and fastest command processor, now on the YSI wiki corne Includes 19 03/12/2015 01:41 AM
[Tutorial] PAWN Pre-Processor - Pre-processor alternatives - Part 5/7 Misiur Tutorials 0 14/04/2015 09:13 PM


All times are GMT. The time now is 04:02 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.