Strcmp with zcmd ?? is it possible
#1

Hello guys
is it possible to use zcmd with strcmp on a gamemode
cause when i tried doing that the strcmp command wont work it will show uknown command
Reply
#2

No, its not possible to use them both.
Reply
#3

I once saw a thread that someone told how to do it but i forgot its name
Reply
#4

Ofcourse you can, rename OnPlayerCommandText callback,
use this form:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
   if(success == 0) return SendClientMessage(playerid, -1, "[ERROR] That command doesn't exist!");

   if(!strcmp(cmdtext, "/test1", true))
   {
      SendClientMessage(playerid, 0xFFFFFFAA, "This is string-comparing command!");
      return 1;
   }

   return 1; //you must return 1 here
}

CMD:test2(playerid, params[])
{
   SendClientMessage(playerid, 0xFFFF00AA, "This is ZCMD command!");
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)