[Plugin] Pawn.CMD

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.
Reply

Quote:
Originally Posted by Vince
Посмотреть сообщение
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.
Reply

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

what's this? how i can remove that message?
Reply

Quote:
Originally Posted by iTzFireShark420
Посмотреть сообщение
[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.
Reply

Quote:
Originally Posted by Vince
Посмотреть сообщение
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
Посмотреть сообщение
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.
Reply

Quote:
Originally Posted by YourShadow
Посмотреть сообщение
Fixed.

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

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.
Reply

How can I do that?

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

...

CMD:faction(playerid)
{
//	...
	return 1;
}
Reply

Quote:
Originally Posted by must006
Посмотреть сообщение
How can I do that?

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

...

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

EDIT: be careful, no idea what the function returns, so you might want to
PHP код:
return PC_EmulateCommand(playerid"faction"), 1
Reply

Thanks @Djole1337

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

Код:
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:

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

stock SendErrorMessage(playerid)
{
	SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command. (test)");
	return 0;
}
Reply

Quote:
Originally Posted by must006
Посмотреть сообщение
Thanks @Djole1337

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

Код:
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:

Код:
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 код:
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;

Reply

Pawn CMD plugin version 3.1.2 work but 3.1.4 commands not working. What is the reason for this?
Reply

Can you update the plugin for 0.3.8? thank you very much
Reply

Quote:
Originally Posted by rfr
Посмотреть сообщение
Can you update the plugin for 0.3.8? thank you very much
0.3.8 is not even officially released yet. Have patience.
Reply

Quote:
Originally Posted by rfr
Посмотреть сообщение
Can you update the plugin for 0.3.8? thank you very much
Even the current version of Pawn.CMD works fine with 0.3.8
Reply

Quote:
Originally Posted by Debjit
Посмотреть сообщение
Even the current version of Pawn.CMD works fine with 0.3.8
You sure? I just installed Pawn.CMD on my 0.3.8 script and the nothing happened when I typed a cmd, it literally say Unknown command. Unless I installed it wrong.
Reply

Quote:
Originally Posted by SteSte
Посмотреть сообщение
You sure? I just installed Pawn.CMD on my 0.3.8 script and the nothing happened when I typed a cmd, it literally say Unknown command. Unless I installed it wrong.
I dont know but its working fine in my case, commands areworking fine and everything else.
Tried in linux too (debian)

Код HTML:
v0.3.8-RC4-1, ©2005-2017 SA-MP Team

[11:17:08] filterscripts = ""  (string)
[11:17:08] 
[11:17:08] Server Plugins
[11:17:08] --------------
[11:17:10]  Loading plugin: pawncmd
[11:17:10] Pawn.CMD plugin v3.1.4 by urShadow loaded
[11:17:10]   Loaded.
Reply

How to test the speed?
Reply

Quote:
Originally Posted by ShapeGaz
Посмотреть сообщение
How to test the speed?
Look at this https://gist.github.com/urShadow/14d...17088cf2f23cbe
Reply

PHP код:
PC_EmulateCommand(playerid, const cmdtext[]); 
Using this inside another command doesn't call OnPlayerCommandReceived at all.

ex:

PHP код:
cmd:test(playeridparams[])
{
    
PC_EmulateCommand(playerid"cmdtest");
}
cmd:cmdtest(playeridparams[])
{
}
OnPlayerCommandReceived(playeridcmd[], params[], flags)
{
    
printf("%s"cmd// it prints "test" correctly but never: emulated "cmdtest"

Reply


Forum Jump:


Users browsing this thread: 14 Guest(s)