SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 09/05/2017, 12:16 PM   #371
RakeDW
Little Clucker
 
Join Date: Jul 2014
Posts: 38
Reputation: 0
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Dayrion View Post
Can we deactivate commands per player?
Code:
new bool: actived[MAX_PLAYERS] = true;

CMD:example(id, params[]) {
if (!actived[id]) return 1;
//.......
return 1;
}
This?
RakeDW is offline   Reply With Quote
Old 13/05/2017, 06:22 PM   #372
vannesenn
Gangsta
 
vannesenn's Avatar
 
Join Date: Feb 2011
Posts: 669
Reputation: 15
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by RakeDW View Post
Code:
new bool: actived[MAX_PLAYERS] = true;

CMD:example(id, params[]) {
if (!actived[id]) return 1;
//.......
return 1;
}
This?
Nop... It's better via callback OnPlayerCommandReceived

Code:
new bool:active[MAX_PLAYERS];

public OnPlayerCommandReceived(...)
{
     if(!active[playerid]) return (false);
    // REST OF THE CODE
}
vannesenn is offline   Reply With Quote
Old 14/05/2017, 02:29 AM   #373
GSFBart
Big Clucker
 
Join Date: Apr 2017
Location: Brazil
Posts: 71
Reputation: 1
Default Re: Pawn.CMD - the fastest and most functional command processor

[13/05/2017 20:55:57] Error: Function not registered: 'PC_EmulateCommand'

Code:
CMD:fakecmd(playerid, params[])
{
    //[...]
    new sCMD[30];

    if(sscanf(params, "ds[30]", id, sCMD)) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Uso correto: /FakeCMD [ ID ] [ Comando ]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Ninguém online com esse ID!");  

    PC_EmulateCommand(id, sCMD); 
    return 1;
}
GSFBart is offline   Reply With Quote
Old 14/05/2017, 03:27 AM   #374
amirm3hdi
Banned
 
Join Date: Apr 2015
Location: Brain
Posts: 271
Reputation: 14
Default Re: Pawn.CMD - the fastest and most functional command processor

Server doesn't need fast command processing...
Developer needs a command processor that is simple and fast to develop not fast to process.
amirm3hdi is offline   Reply With Quote
Old 14/05/2017, 03:11 PM   #375
Chris53340
High-roller
 
Chris53340's Avatar
 
Join Date: Jul 2011
Posts: 1,766
Reputation: 54
Default Re: Pawn.CMD - the fastest and most functional command processor

Thank you.

I would like to know how PAWN.CMD used for irregular use.

Here is my code with strcmp

Resume

PHP Code:
public OnPlayerCommandText(playeridcmdtext[])
{
    new 
HelpCMD[20];
    
format(HelpCMDsizeof(HelpCMD), "/aide");
    if(
strcmp(HelpCMDcmdtexttrue10) == 0
    {
        
// My Code
        
return 1;
    }
    return 
1;

With PWN.CMD

PHP Code:
cmd:HelpCMD(playeridparam[]) return 1
No put my irregular variable.

Thanks.. (Bad English)
__________________
Ma présentation / Mon Showroom

[11 FilterScripts]
[4 Maps]
[6 Includes]
[9 Tutoriels]
[1 Tool/Web/Other]
Chris53340 is offline   Reply With Quote
Old 18/05/2017, 09:36 AM   #376
Chris53340
High-roller
 
Chris53340's Avatar
 
Join Date: Jul 2011
Posts: 1,766
Reputation: 54
Default Re: Pawn.CMD - the fastest and most functional command processor

Bump pls
__________________
Ma présentation / Mon Showroom

[11 FilterScripts]
[4 Maps]
[6 Includes]
[9 Tutoriels]
[1 Tool/Web/Other]
Chris53340 is offline   Reply With Quote
Old 18/05/2017, 12:27 PM   #377
Dice_
Huge Clucker
 
Dice_'s Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 406
Reputation: 48
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Chris53340 View Post
Thank you.

I would like to know how PAWN.CMD used for irregular use.

Here is my code with strcmp

Resume

PHP Code:
public OnPlayerCommandText(playeridcmdtext[])
{
    new 
HelpCMD[20];
    
format(HelpCMDsizeof(HelpCMD), "/aide");
    if(
strcmp(HelpCMDcmdtexttrue10) == 0
    {
        
// My Code
        
return 1;
    }
    return 
1;

With PWN.CMD

PHP Code:
cmd:HelpCMD(playeridparam[]) return 1
No put my irregular variable.

Thanks.. (Bad English)
What are you trying to do?please explain it again..
__________________
quit
Dice_ is offline   Reply With Quote
Old 18/05/2017, 12:34 PM   #378
Yuri8
Big Clucker
 
Join Date: Nov 2016
Posts: 62
Reputation: 0
Default Re: Pawn.CMD - the fastest and most functional command processor

How can I create a command? I know only ZCMD style.
Yuri8 is offline   Reply With Quote
Old 18/05/2017, 12:47 PM   #379
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,443
Reputation: 120
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Chris53340 View Post
Bump pls
PHP Code:
CMD:aide(playeridparams[])
{
    
// ton code... / your code ...
    
return 1;

Also, "params[]" can be removed since you don't need any parameters. I mean, if you have only "/aide" and nothing more, remove "params[]".
Tu peux retirer "params[]" si tu n'as pas besoin de mettre de paramètre. Si ta commande est juste "/aide" sans paramètre (ex: "/aide 1" où 1 est un paramètre de la commande), tu peux retirer "params[]".
__________________
« What matters isn't to going further, it's the way to get there »
Dayrion is offline   Reply With Quote
Old 20/05/2017, 12:46 AM   #380
YouHack
Huge Clucker
 
Join Date: Jan 2017
Posts: 275
Reputation: 22
Default Re: Pawn.CMD - the fastest and most functional command processor

I've replaced ZCMD with this one in linux, and it works like a charm, fast AF.
but in Windows...
Code:
[00:26:55]----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, (C)2005-2015 SA-MP Team

[00:26:50] 
[00:26:50] Server Plugins
[00:26:50] --------------
[00:26:50]  Loading plugin: crashdetect
[00:26:50]   CrashDetect v4.13.1 is OK.
[00:26:50]   Loaded.
[00:26:50]  Loading plugin: mysql_static
[00:26:50]   Failed.
[00:26:50]  Loading plugin: mysql
[00:26:50]  >> plugin.mysql: R39-3 successfully loaded.
[00:26:50]   Loaded.
[00:26:50]  Loading plugin: sscanf
[00:26:50] 

[00:26:50]  ===============================

[00:26:50]       sscanf plugin loaded.     

[00:26:50]          Version:  2.8.1        

[00:26:50]    (c) 2012 Alex "Y_Less" Cole  

[00:26:50]  ===============================

[00:26:50]   Loaded.
[00:26:50]  Loading plugin: streamer
[00:26:50]   Failed.
[00:26:50]  Loading plugin: pawncmd
[00:26:50] Pawn.CMD plugin v3.1.2 by urShadow loaded
[00:26:50]   Loaded.
[00:26:50]  Loading plugin: nativechecker
[00:26:50]   Loaded.
[00:26:50]  Loaded 5 plugins.

[00:26:50] 
[00:26:50] Filterscripts
[00:26:50] ---------------
[00:26:50]   Loaded 0 filterscripts.

[00:26:55] [debug] Server crashed due to an unknown error
[00:26:56] [debug] Native backtrace:
[00:26:56] [debug] #0 012922f7 in ?? () from plugins\pawncmd.dll
[00:26:56] [debug] #1 012945fb in ?? () from plugins\pawncmd.dll
[00:26:56] [debug] #2 00469ab5 in ?? () from samp-server.exe
[00:26:56] [debug] #3 65646f6d in ?? () from samp-server.exe
( Off topic, don't ask for time in debug, it's real. I try to stay awake these days to focus on coding lol )
YouHack 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 05:23 PM
[Tutorial] PAWN Pre-Processor (Updated 22/04/13) Misiur Tutorials 6 10/07/2016 03:33 PM
[Include] y_commands - Most flexible and fastest command processor, now on the YSI wiki corne Includes 19 03/12/2015 02:41 AM
[Tutorial] PAWN Pre-Processor - Pre-processor alternatives - Part 5/7 Misiur Tutorials 0 14/04/2015 10:13 PM


All times are GMT. The time now is 01:47 AM.


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