Sends error message?
#6

Quote:
Originally Posted by Affan
View Post
Oh thats why. Thanks but is there any way to do like /color green other than Onplayercommandtext?
You can use

pawn Code:
CMD:color(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, 0xCC0000AA, "Valid colors: green, red, blue");

    new tmp[10];
    if(!strcmp(params, "green", true))
    {
        SetPlayerColor(playerid, 0x33AA33AA);
        tmp="green";
    }
    else if(!strcmp(params, "red", true))
    {
        SetPlayerColor(playerid, 0xFF0000AA);
        tmp="red";
    }
    else if(!strcmp(params, "blue", true))
    {
        SetPlayerColor(playerid, 0x0000FFAA);
        tmp="blue";
    }
    //and so on
   
    new string[100];
    format(string, sizeof(string), "You set your color to %s", tmp);
    SendClientMessage(playerid, 0xCCCC00AA, string);
    return 1;
}
Reply


Messages In This Thread
Sends error message? - by Affan - 10.06.2013, 03:43
Re: Sends error message? - by Ciandlah - 10.06.2013, 04:21
Re: Sends error message? - by DerickClark - 10.06.2013, 04:32
Re: Sends error message? - by Affan - 10.06.2013, 04:40
Re: Sends error message? - by DerickClark - 10.06.2013, 04:46
Re: Sends error message? - by [ABK]Antonio - 10.06.2013, 05:03
Re: Sends error message? - by Affan - 10.06.2013, 05:14

Forum Jump:


Users browsing this thread: 1 Guest(s)