SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 06/09/2017, 06:02 AM   #401
Debjit
Huge Clucker
 
Debjit's Avatar
 
Join Date: Feb 2017
Posts: 327
Reputation: 28
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Vince View Post
My issue with this plugin is that it stops commands in other scripts that use traditional methods from working. For example if I load fs_debug then the commands in that script won't work at all. There is no output whatsoever. Converting that script took all of ten minutes because thankfully it uses at least dcmd but it's still annoying.
Yea Same here, I just switched back to ZCMD because of its incompatibilty to work with other command plugins such as dcmd and strcmp which are being used as filterscripts( and the fs are really needed when the gamemode is in development stages.).
Hope this incompatibility problem will be fixed soon.
__________________

Join Our: Forums | Discord
Release Date Announced! Read More


More the knowledge, lesser the ego. Lesser the Knowledge, more the ego.- Albert Einstein

Last edited by Debjit; 06/09/2017 at 10:07 AM.
Debjit is offline   Reply With Quote
Old 09/09/2017, 03:33 AM   #402
iTzFireShark420
Little Clucker
 
Join Date: Nov 2014
Posts: 6
Reputation: 0
Default Re: Pawn.CMD - the fastest and most functional command processor

[19:40:29] [Pawn.CMD] Plugin::n_PC_RegAlias: command '1000' not found

what's this? how i can remove that message?
iTzFireShark420 is offline   Reply With Quote
Old 09/09/2017, 08:02 AM   #403
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 111
Reputation: 174
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by iTzFireShark420 View Post
[19:40:29] [Pawn.CMD] Plugin::n_PC_RegAlias: command '1000' not found

what's this? how i can remove that message?
Show me your code.
YourShadow is online now   Reply With Quote
Old 09/09/2017, 03:08 PM   #404
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 111
Reputation: 174
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by Vince View Post
My issue with this plugin is that it stops commands in other scripts that use traditional methods from working. For example if I load fs_debug then the commands in that script won't work at all. There is no output whatsoever. Converting that script took all of ten minutes because thankfully it uses at least dcmd but it's still annoying.
Quote:
Originally Posted by Debjit View Post
Yea Same here, I just switched back to ZCMD because of its incompatibilty to work with other command plugins such as dcmd and strcmp which are being used as filterscripts( and the fs are really needed when the gamemode is in development stages.).
Hope this incompatibility problem will be fixed soon.
Fixed.

Updated to 3.1.4.
YourShadow is online now   Reply With Quote
Old 10/09/2017, 06:06 AM   #405
Debjit
Huge Clucker
 
Debjit's Avatar
 
Join Date: Feb 2017
Posts: 327
Reputation: 28
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by YourShadow View Post
Fixed.

Updated to 3.1.4.
Woah Great! Going to switch back to Pawn.CMD.
__________________

Join Our: Forums | Discord
Release Date Announced! Read More


More the knowledge, lesser the ego. Lesser the Knowledge, more the ego.- Albert Einstein
Debjit is offline   Reply With Quote
Old 10/09/2017, 09:17 AM   #406
JasonRiggs
Huge Clucker
 
Join Date: Jul 2016
Location: My bedroom.
Posts: 465
Reputation: 16
Default Re: Pawn.CMD - the fastest and most functional command processor

Such a great effort and updating the thread continuously for people, That's absolutely great, I'm pretty sure that I'll be using this include in the script I'm creating.
__________________


Server IP: 185.12.178.71:7799
Website: nyakos-rp.weebly.com
Beta Launched!
JasonRiggs is offline   Reply With Quote
Old 12/09/2017, 07:19 AM   #407
must006
Little Clucker
 
Join Date: Mar 2012
Posts: 2
Reputation: 0
Default Re: Pawn.CMD - the fastest and most functional command processor

How can I do that?

Code:
Dialog:DIALOG_FACTION(playerid, response, listitem, inputtext[])
{
	if(!response) return cmd_faction(playerid);
//	...
	return 1;
}

...

CMD:faction(playerid)
{
//	...
	return 1;
}
must006 is offline   Reply With Quote
Old 12/09/2017, 07:33 AM   #408
Djole1337
Gangsta
 
Join Date: Apr 2012
Posts: 907
Reputation: 303
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by must006 View Post
How can I do that?

Code:
Dialog:DIALOG_FACTION(playerid, response, listitem, inputtext[])
{
	if(!response) return cmd_faction(playerid);
//	...
	return 1;
}

...

CMD:faction(playerid)
{
//	...
	return 1;
}
PHP Code:
return PC_EmulateCommand(playerid"faction"); 
?

EDIT: be careful, no idea what the function returns, so you might want to
PHP Code:
return PC_EmulateCommand(playerid"faction"), 1
__________________
YouKnowWho
Djole1337 is offline   Reply With Quote
Old 12/09/2017, 09:26 AM   #409
must006
Little Clucker
 
Join Date: Mar 2012
Posts: 2
Reputation: 0
Default Re: Pawn.CMD - the fastest and most functional command processor

Thanks @Djole1337

I also discovered:
Code:
PC_EmulateCommand(playerid, "/faction");
pc_cmd_setinterior(playerid, "0 5");
callcmd::setinterior(playerid, "0 5");
I have a problem now:

Code:
CMD:oldcar(playerid)
{
	if(!IsPlayerAdmin(playerid)) return 0;
//	...
	return 1;
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	if(!success) return SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command. (test)");
	return 1;
}
When using zcmd, if return is 0, "SERVER: Unknown command. (test)" message is displayed automatically. How can I do this with Pawn.CMD? Except that:

Code:
CMD:oldcar(playerid)
{
	if(!IsPlayerAdmin(playerid)) return SendErrorMessage(playerid);
//	...
	return 1;
}

stock SendErrorMessage(playerid)
{
	SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command. (test)");
	return 0;
}
must006 is offline   Reply With Quote
Old 12/09/2017, 11:25 AM   #410
Djole1337
Gangsta
 
Join Date: Apr 2012
Posts: 907
Reputation: 303
Default Re: Pawn.CMD - the fastest and most functional command processor

Quote:
Originally Posted by must006 View Post
Thanks @Djole1337

I also discovered:
Code:
PC_EmulateCommand(playerid, "/faction");
pc_cmd_setinterior(playerid, "0 5");
callcmd::setinterior(playerid, "0 5");
I have a problem now:

Code:
CMD:oldcar(playerid)
{
	if(!IsPlayerAdmin(playerid)) return 0;
//	...
	return 1;
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	if(!success) return SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command. (test)");
	return 1;
}
When using zcmd, if return is 0, "SERVER: Unknown command. (test)" message is displayed automatically. How can I do this with Pawn.CMD? Except that:

Code:
CMD:oldcar(playerid)
{
	if(!IsPlayerAdmin(playerid)) return SendErrorMessage(playerid);
//	...
	return 1;
}

stock SendErrorMessage(playerid)
{
	SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command. (test)");
	return 0;
}
Well he provided this callback, its similar to zcmd's one except the params are different. You should check https://github.com/urShadow/Pawn.CMD he provied quite a few examples.
PHP Code:
public OnPlayerCommandPerformed(playeridcmd[], params[], resultflags)
{
    
// if(result == -1)
    // so you should do something like
    
if(result == -|| result == 0)
    {
        
SendClientMessage(playerid0xFFFFFFFF"SERVER: Unknown command.");
        return 
0;
    }

    return 
1;

__________________
YouKnowWho
Djole1337 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 07:09 PM.


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