Invalid Command
#1

Hey guys, I'm trying to create an invalid command return with ZCMD, but it's not working, I have no errors or warnings...

Am I supposed to add this into a new filterscript??

Код:
#include <a_samp>
#include <zcmd>

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
return SendClientMessage(playerid, -1, "Invalid command, use /cmds to view the general commands");
}
return 1;
}
NOTE: This is the ENTIRE code.
Reply
#2

ZCMD doesnt work when you have strcmp ....Do you have strcmp commands in ur gm/fs ?
Reply
#3

it works on OnPlayerCommandPerformed(playerid, cmdtext[], success)
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) {
        SendClientMessage(playerid, -1, "Invalid command, use /cmds to view the general commands"
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by ElkaBlazer
Посмотреть сообщение
ZCMD doesnt work when you have strcmp ....Do you have strcmp commands in ur gm/fs ?
No. Wrong. If you have
pawn Код:
#include <zcmd>
included
pawn Код:
OnPlayerCommandText(playerid,cmdtext[])
won't be called.

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid, -1, "Invalid command, use /cmds to view the general commands");
    return 1;
}
Kinda same as yours. You sure it's not working?
Reply
#5

I'm sure... when I type a random command nothing happens...
Reply
#6

The code you gave isn't working
Reply
#7

EDIT: ACCIDENTAL DOUBLE POST :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)