Just a lil help
#4

pawn Код:
if(strcmp(cmd, "/ac", true) == 0)
{      
    new name[maxplayername];
    GetPlayerName(playerid, name, sizeof(name));
       
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
        idx++;
    }
    new offset = idx;
    new result[128];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
        result[idx - offset] = cmdtext[idx];
        idx++;
    }
    result[idx - offset] = EOS;
               
    if(!strlen(result))
    {
        PlayerMessage(playerid, yellow1, "/ac [admin chat]");
        return 1;
    }
               
    if(Player[playerid][admin] > 0)
    {
        format(str, sizeof(str), "%s says: %s", name, result);
        PlayerMessage(playerid, ppurple3, str);
    }
    return 1;
}
Reply


Messages In This Thread
Just a lil help - by Kinetic - 03.03.2009, 10:02
Re: Just a lil help - by mamorunl - 03.03.2009, 10:03
Re: Just a lil help - by Kinetic - 03.03.2009, 10:06
Re: Just a lil help - by Dujma - 03.03.2009, 10:08
Re: Just a lil help - by Kinetic - 03.03.2009, 10:11
Re: Just a lil help - by Dujma - 03.03.2009, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)