SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 09/09/2017, 02:33 AM   #401
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, 07:02 AM   #402
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 120
Reputation: 236
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 offline   Reply With Quote
Old 09/09/2017, 02:08 PM   #403
YourShadow
Big Clucker
 
YourShadow's Avatar
 
Join Date: Apr 2016
Posts: 120
Reputation: 236
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 offline   Reply With Quote
Old 10/09/2017, 05:06 AM   #404
Zeth
Huge Clucker
 
Zeth's Avatar
 
Join Date: Feb 2017
Location: India
Posts: 480
Reputation: 90
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.
__________________
Zeth is online now   Reply With Quote
Old 10/09/2017, 08:17 AM   #405
JasonRiggs
Gangsta
 
Join Date: Jul 2016
Location: My bedroom.
Posts: 744
Reputation: 39
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.
__________________


Discord: Riggs #5210
JasonRiggs is offline   Reply With Quote
Old 12/09/2017, 06:19 AM   #406
must006
Little Clucker
 
Join Date: Mar 2012
Posts: 7
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, 06:33 AM   #407
Djole1337
Gangsta
 
Join Date: Apr 2012
Posts: 905
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, 08:26 AM   #408
must006
Little Clucker
 
Join Date: Mar 2012
Posts: 7
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, 10:25 AM   #409
Djole1337
Gangsta
 
Join Date: Apr 2012
Posts: 905
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
Old 07/10/2017, 11:16 AM   #410
Max_Andolini
Huge Clucker
 
Max_Andolini's Avatar
 
Join Date: Oct 2013
Posts: 327
Reputation: 37
Default Re: Pawn.CMD - the fastest and most functional command processor

Pawn CMD plugin version 3.1.2 work but 3.1.4 commands not working. What is the reason for this?
Max_Andolini 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
[Plugin] Vectoral Pawn - STL Data containers for pawn Rancho Plugin Development 70 03/05/2017 07:41 PM
Forum bug with [pawn][/pawn] BBCODE Yuripe Everything and Nothing 4 06/10/2012 12:58 PM
[Tool/Web/Other] PAWN Scanner - Scan PAWN files for information. Slice Tools and Files 10 15/07/2012 07:09 PM
[Help With Pawn] Pawn and compiler is not working..... D_Less Client Support 3 09/03/2012 04:49 AM


All times are GMT. The time now is 05:57 PM.


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