Help with 1 command
#1

pawn Код:
if(strcmp(cmd, "/write", true) == 0 && PlayerAdminLevel[playerid] >= 1){

        if(IsAdminOrRecon[playerid] == 0){
        SendClientMessage(playerid,COLOR_ERROR,"Please Login Into Your Mod/Admin Account! Use /adminlog");
        return 1;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))    {
        SendClientMessage(playerid, COLOR_ERROR, "USAGE: /write [Colour] [Text]");
        SendClientMessage(playerid, COLOR_WHITE, "Colours: 0=black 1=white 2=red 3=orange 4=yellow 5=green 6=blue 7=purple 8=brown 9=pink");
        return 1;
        }
        new Colour;
        Colour = strval(tmp);
        if(Colour > 9 || Colour < 0)    {
        SendClientMessage(playerid, COLOR_ERROR, "USAGE: /write [Colour] [Text]");
        SendClientMessage(playerid, COLOR_WHITE, "Colours: 0=black 1=white 2=red 3=orange 4=yellow 5=green 6=blue 7=purple 8=brown 9=pink");
        return 1;
        }
        tmp = strtok(cmdtext, idx);
        if(Colour == 0) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_BLACK,string);
        return 1;
        }
        else if(Colour == 1) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_WHITE,string);
        return 1;
        }
        else if(Colour == 2) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_RED,string);
        return 1;
        }
        else if(Colour == 3) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_ORANGE,string);
        return 1;
        }
        else if(Colour == 4) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_YELLOW,string);
        return 1;
        }
        else if(Colour == 5) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_GREEN,string);
        return 1;
        }
        else if(Colour == 6) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_BLUE,string);
        return 1;
        }
        else if(Colour == 7) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_PURPLE,string);
        return 1;
        }
        else if(Colour == 8) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_BROWN,string);
        return 1;
        }
        else if(Colour == 9) {
        format(string,256,"%s",cmdtext[9]); SendClientMessageToAll(COLOR_PINK,string);
        return 1;
        }
    return 1;
    }

how i can make in that command like in 1 sentence i can write more than 1 color like /ann command when i use ~r~ or ~w~ or ~g~
Reply


Messages In This Thread
Help with 1 command - by ColdRain - 19.12.2011, 14:27
Respuesta: Help with 1 command - by [DOG]irinel1996 - 19.12.2011, 14:34
Re: Help with 1 command - by ColdRain - 19.12.2011, 14:35
Re: Help with 1 command - by Hoborific - 19.12.2011, 14:39
Respuesta: Re: Help with 1 command - by [DOG]irinel1996 - 19.12.2011, 14:39
Re: Help with 1 command - by ColdRain - 19.12.2011, 14:56
Respuesta: Help with 1 command - by [DOG]irinel1996 - 19.12.2011, 14:58
Re: Help with 1 command - by ColdRain - 19.12.2011, 15:00
Respuesta: Re: Help with 1 command - by [DOG]irinel1996 - 19.12.2011, 15:03
Re: Help with 1 command - by ColdRain - 19.12.2011, 15:03

Forum Jump:


Users browsing this thread: 1 Guest(s)