[y_commands] /commands loop..
#8

love you (Y)

Final Result:

pawn Код:
YCMD:commands(playerid, params[], help)
{
    if(help) return SendInfoMessage(playerid,"Shows all available commands to a certain player.");
    new count = Command_GetPlayerCommandCount(playerid);
    new string[128],str[128];
    format(string,sizeof(string),"List of commands for {a9c4e4}%s{FFFFFF}:",pName(playerid));
    SendInfoMessage(playerid,"Type /help [command] for more info.");
    SendInfoMessage(playerid,string);
    for (new i = 0; i < count; i+=5)
    {
        new buffer[YSI_MAX_STRING];
        buffer = Command_GetNext(i, playerid);
        if(buffer[0] != 0) format(str, sizeof (str), "%s /%s", str, buffer);
        buffer = Command_GetNext(i+1, playerid);
        if(buffer[0] != 0) format(str, sizeof (str), "%s /%s", str, buffer);
        buffer = Command_GetNext(i+2, playerid);
        if(buffer[0] != 0) format(str, sizeof (str), "%s /%s", str, buffer);
        buffer = Command_GetNext(i+3, playerid);
        if(buffer[0] != 0) format(str, sizeof (str), "%s /%s", str, buffer);
        buffer = Command_GetNext(i+4, playerid);
        if(buffer[0] != 0) format(str, sizeof (str), "%s /%s", str, buffer);
        SendInfoMessage(playerid, str);
        format(str,sizeof(str),"");
    }
    return 1;
}
Hope someone more than me got use of it.
Thank you ******.
Reply


Messages In This Thread
[y_commands] /commands loop.. - by introzen - 29.06.2013, 07:43
Re: [y_commands] /commands loop.. - by introzen - 29.06.2013, 10:27
Re: [y_commands] /commands loop.. - by IstuntmanI - 29.06.2013, 10:29
Re: [y_commands] /commands loop.. - by introzen - 29.06.2013, 10:41
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:01
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:14
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:36
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 16:44
Re: [y_commands] /commands loop.. - by introzen - 30.06.2013, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)