SA-MP Forums Archive
zcmd problem - 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: zcmd problem (/showthread.php?tid=312167)



zcmd problem - Face9000 - 20.01.2012

Hello,i've started using zcmd command processor and i've a problem.

pawn Код:
zmcd(me, playerid, params[])
    {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "How to use: /me [action]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
    SendClientMessageToAll(0xFF9900AA, str);
    }
"error 017: undefined symbol zmcd"

What's wrong?


Re: zcmd problem - [ABK]Antonio - 20.01.2012

it would be, CMD:me(playerid, params[]) or COMMAND:me(playerid, params[]) i know there's another way but i use the first one there


Re: zcmd problem - Face9000 - 20.01.2012

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
it would be, CMD:me(playerid, params[]) or COMMAND:me(playerid, params[]) i know there's another way but i use the first one there
Not working.


Re: zcmd problem - trapped1 - 20.01.2012

Код:
CMD:me(playerid, params[])
    {
    if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "How to use: /me [action]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
    SendClientMessageToAll(0xFF9900AA, str);
    }
Try this!


Re: zcmd problem - iPLEOMAX - 20.01.2012

pawn Код:
CMD:me(playerid, params[])
{
    if(isnull(params))return SendClientMessage(playerid, 0xFF0000FF, "How to use: /me [action]");
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s %s", str, params);
    SendClientMessageToAll(0xFF9900AA, str);
    return true;
}



Re: zcmd problem - Face9000 - 20.01.2012

Same errors for both


Re: zcmd problem - trapped1 - 20.01.2012

Hmm show the error .. if its zcmd maybe forgot #include zcmd


Re: zcmd problem - Face9000 - 20.01.2012

Quote:
Originally Posted by trapped1
Посмотреть сообщение
Hmm show the error .. if its zcmd maybe forgot #include zcmd
I've already the zcmd include.

"error 017: undefined symbol zmcd"


Re: zcmd problem - iPLEOMAX - 20.01.2012

Try mine again, it will work.


Re: zcmd problem - iZN - 20.01.2012

Try this Logitech90.
pawn Код:
CMD:me(playerid, params[])
    {
    if(isnull(params)) {
SendClientMessage(playerid, 0xFF0000FF, "How to use: /me [action]");
  }
    else {
    new str[128];
    GetPlayerName(playerid, str, sizeof(str));
    format(str, sizeof(str), "* %s %s", str, params);
    SendClientMessageToAll(0xFF9900AA, str);
}
    return 1;
}
EDIT: iPleoMax command will work also.