SA-MP Forums Archive
No commands are working :/ (ZCMD) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: No commands are working :/ (ZCMD) (/showthread.php?tid=528362)



No commands are working :/ (ZCMD) - d3ll - 27.07.2014

I've been experiancing this problem, for well... a few hours. I've been trying to work constantly to fix it - no luck. I'll post my shit below...

pawn Код:
#include <zcmd>
#define ALTCOMMAND:%1->%2; COMMAND:%1(playerid, params[]) return cmd_%2(playerid, params);
Command handler:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(P_TEMP[playerid][loggedin] != 1) return SendClientError(playerid, "You are not logged in!");
    if(!success) return SendClientMessage(playerid, -1, "This {B9C9BF}command{ffffff} has not been found. Please use: {B9C9BF}/commands {ffffff}({B9C9BF}/cmds{ffffff})");
    return 1;
}
Command example:
pawn Код:
COMMAND:forcept(playerid)
{
    if(P_INFO[playerid][PAdmin] < 3) return SendClientError(playerid, CANT_USE_CMD);
    PlayerLoop(p) P_INFO[p][PTime] = 3599;
    return 1;
}
Although, it isn't just this command that's not working. All commands seem inactive..

When I perform a command:








Re: No commands are working :/ (ZCMD) - SanAndreasMP - 27.07.2014

Is there any "/cmds" script in your GM?


Re: No commands are working :/ (ZCMD) - d3ll - 27.07.2014

Of course there is.. you don't seem to understand. Every command is inactive, not just /cmds.

pawn Код:
ALTCOMMAND:cmds->commands;



Re: No commands are working :/ (ZCMD) - Beckett - 27.07.2014

If a command doesn't return 1; it will not be performed.


Re: No commands are working :/ (ZCMD) - d3ll - 27.07.2014

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
If a command doesn't return 1; it will not be performed.
If I didn't return 1; a error would be prompt.


Re: No commands are working :/ (ZCMD) - Dignity - 27.07.2014

Quote:
Originally Posted by d3ll
Посмотреть сообщение
If I didn't return 1; a error would be prompt.
No, it wouldn't, only in some cases.


Did you try commenting out the if(!success) statement? Maybe the issue lies with your command, and not this line.


Re: No commands are working :/ (ZCMD) - Juvanii - 27.07.2014

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(P_TEMP[playerid][loggedin] != 1) return SendClientError(playerid, "You are not logged in!");
    if(!success) SendClientMessage(playerid, -1, "This {B9C9BF}command{ffffff} has not been found. Please use: {B9C9BF}/commands {ffffff}({B9C9BF}/cmds{ffffff})");
    return 1;
}



Re: No commands are working :/ (ZCMD) - Beckett - 27.07.2014

Quote:
Originally Posted by d3ll
Посмотреть сообщение
If I didn't return 1; a error would be prompt.
No it will not for example.

pawn Код:
CMD:sendmsg(playerid,params[])
{
SendClientMessage(playerid,-1,"I am useless");
}
In such case the command will go successful but it will send you the !success message aswell.


Re: No commands are working :/ (ZCMD) - doodlebob666 - 17.04.2018

bump i got this same problem