strcmp cmd in zcmd
#1

Hello, is it possible to make a strcmp cmd in zcmd.
I cannot make a cmd like this
pawn Код:
CMD:tele 1(playerid,params[]) {
Is it possible? if yes then how?
Reply
#2

(if correct) You cannot use spaces within commands, you can use things like isnull to check if the params is null or use sscanf.

This is an example:

pawn Код:
CMD:tele(playerid, params[])
{
    if(sscanf(params, "i", teleid)) return SendClientMessage(playerid, -1, "Usage: /tele [id]");
    if(teleid == 1)
    {
        //If they typed /tele 1, do something here
    }
    return 1;
}
Using ZCMD and sscanf.
Reply
#3

The command for strcmp would be the exact same in ZCMD, the only difference is the parameters in which ZCMD uses.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)