How to convert this command into ZCMD?
#5

Quote:
Originally Posted by JaKe Elite
Посмотреть сообщение
I suggest you use sscanf, strtok is outdated & slow. Anywho here it is, sscanf version.

pawn Код:
CMD:setaccent(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] > 1)
    {
        new accent[27], string[128];
        if(sscanf(params, "s[27]", accent))
        {
            SendClientMessage(playerid,0xFFFFFFAA,"Usage: /accent {58A624}[ accent name ]{FFFFFF}.");
            SendClientMessage(playerid,0xFFFFFFAA,"Example: {58A624}/accent Portuguese ");
            return 1;
        }
        if(strlen(accent) <= 6 || strlen(accent) > 26) return cmd_setaccent(playerid, ""); // recall the command /setaccent
       
        format(string,sizeof(string),"Accent: You have changed your accent to {58A624}%s.",accent);
        SendClientMessage(playerid,0xFFFFFFAA,string);
        strmid(pAccent[playerid],accent,0,sizeof(accent),255);
    }
    return 1;
}
Also you do not need to use IsPlayerConnected when a player uses a command, it is pretty obvious that the user is online, mmm GF Edit alert?
Wow, yours worked fine..But, idk now...I mean, it doesn't say anything when I type regularly...Here's where I found it
http://pastebin.com/8drSMj1s
Reply


Messages In This Thread
How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 13:42
Re: How to convert this command into ZCMD? - by Mouiz - 10.07.2015, 13:48
Re: How to convert this command into ZCMD? - by JaKe Elite - 10.07.2015, 13:59
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 13:59
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 14:04
Re: How to convert this command into ZCMD? - by JaKe Elite - 10.07.2015, 14:05
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 14:19
Re: How to convert this command into ZCMD? - by JaKe Elite - 10.07.2015, 14:40
Re: How to convert this command into ZCMD? - by NotYoMama - 10.07.2015, 14:55
Re: How to convert this command into ZCMD? - by Threshold - 10.07.2015, 15:06

Forum Jump:


Users browsing this thread: 3 Guest(s)