Help with Zcmd
#1

Hello. First, I'm Italian and sorry for my bad english :P... I have one problem. How to make equal command with different name? Example:

CommandText:

Код:
if(!strcmp("/hello", cmdtext, true) || !strcmp("/hi", cmdtext, true))
{
SendClientMessage(playerid, white, "Hello and welcome to this server!");
return 1;
}
And ZCMD? If I add "||" pawno give me some error.
Reply
#2

pawn Код:
COMMAND:hello(playerid, params[])
{
    SendClientMessage(playerid, white, "Hello and welcome to this server!");
    return 1;
}
pawn Код:
COMMAND:hi(playerid, params[])
{
    return cmd_hello(playerid, params);
}
Enjoy
Reply
#3

Ahaha... thank! I try return CMD_hello, but give me the errore "Undefinied symbol CMD_hello". Damned case sensitive xD. Thank again!
Reply
#4

mmmm yes... It's better than "{}". Thanks to you too =)
Reply
#5

Yes, I see... No problem.... for me :P
Reply
#6

Ehm... I have a problem. How toggle "Unknown Command" with ZCMD when a command doesn't exist?
Reply
#7

Quote:
Originally Posted by mitosking
Посмотреть сообщение
Ehm... I have a problem. How toggle "Unknown Command" with ZCMD when a command doesn't exist?
Quote:
Originally Posted by Las Venturas CNR
Посмотреть сообщение
You mean how to use like your own message? I don't think it's possible, because ZCMD supposedly disables OnPlayerCommandText.
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
    if(!success) return SendClientMessage(playerid, 0xff000000, "Example of custom message");
    return true;
}
Reply
#8

Unknown Command comes because you don't have right returns . Try to use return 1.
Reply
#9

Quote:
Originally Posted by Gertin
Посмотреть сообщение
Unknown Command comes because you don't have right returns . Try to use return 1.
God... if you don't even know what are we talking about, please.. shut up.
Reply
#10

Thanks Alby ... (loool)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)