Help with command
#3

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
For the love of God use sscanf and ZCMD....

pawn Код:
new playerPrefix[MAX_PLAYERS][24];

CMD:changeprefix(playerid,params[]) {
    new prefix[24];
    if(sscanf(params,"s[24]",prefix)) return SendClientMessage(playerid,COLOR_RED,"Usage: /changeprefix [Prefix]");
    if(strlen(prefix) >= 25 || strlen(prefix) <= 0) return SendClientMessage(playerid,COLOR_RED,"Invalid prefix size");
    format(playerPrefix[playerid],sizeof(prefix),"%s",prefix);
    return true;
}
I do that, but when i write /changeprefix blablabla, he says Usage: /changeprefix [Prefix]

I know my english is bad.
Reply


Messages In This Thread
Help with command - by Mazda48 - 16.11.2016, 13:34
Re: Help with command - by TwinkiDaBoss - 16.11.2016, 15:33
Re: Help with command - by Mazda48 - 16.11.2016, 17:12
Re: Help with command - by Mazda48 - 18.11.2016, 10:41
Re: Help with command - by aymane123 - 18.11.2016, 10:57
Re: Help with command - by Mazda48 - 19.11.2016, 09:28

Forum Jump:


Users browsing this thread: 3 Guest(s)