Please Help ZCMD && sscanf
#1

How do I change this command:


Код:
if(!strcmp(cmd,"/Act",true))
{
cmd = strtok(cmdtext,idx);
if(!strlen(cmd))
{
return SendClientMessage(playerid,COLOR_WHITE,"Usage: /Act");
}
if(!strcmp(cmd,"Stop",true))
{
//
return 1;
}
else if(!strlen(cmd))
{
return SendClientMessage(playerid,COLOR_WHITE,"Usage: /Act");
}
}
to ZCMD?
Reply
#2

pawn Код:
CMD:act(playerid, params[]) {
    if(isnull(params)) // check if anything was typed after "/act"
        return SendClientMessage(playerid,COLOR_WHITE,"Usage: /Act");
       
    if(!strcmp(params, "stop", true)) // check if what was typed was "stop"
        return 1;
    return 1;
}
Your command didn't contain much code to go off.
Reply
#3

tnx !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)