How to convert this command into ZCMD?
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
        new cmd[256];
        new tmp[256];
        new string[128];
        new idx;
        cmd = strtok(cmdtext, idx);
        if(!strcmp(cmd,"/setaccent", true))
        {
            if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pAdmin] > 1)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp) || strlen(tmp) <= 6 || strlen(tmp) > 26)
                {
                        SendClientMessage(playerid,0xFFFFFFAA,"Usage: /accent {58A624}[ accent name ]{FFFFFF}.");
                        SendClientMessage(playerid,0xFFFFFFAA,"Example: {58A624}/accent Portuguese ");
                        return 1;
                }
                format(string,sizeof(string),"Accent: You have changed your accent to {58A624}%s.",tmp);
                SendClientMessage(playerid,0xFFFFFFAA,string);
                strmid(pAccent[playerid],tmp,0,sizeof(tmp),255);
                }
                return 1;
        }
        return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)