[FilterScript] Colors Menu by Misho
#9

You're using about " 3 * 18 " lines of code inside the script you've made, rather than that with a simple switch statement it'll be more organized and easier to read.

pawn Код:
switch(listitem)
{
    case 0: SetPlayerColor(...)
    case 1: SetPlayerColor(...)
}
--

Quote:

#if defined FILTERSCRIPT

So, you tell me, is it defined in the script?

--

Quote:

#pragma tabsize 0

Tabsize? For such a small thing you're lazy to just tab some short lines of code? Pretty pathetic.

--

(Not a grammar nazi)

Quote:

"Choose You're Color"

"You're" is meant to be said as "You are" so that just says "Choose You are Color" which doesn't make quite sense

pawn Код:
public ondialogres(...)
{
    if(dialogid == 24)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: SetPlayerColor(playerid,Red);
                case 1: SetPlayerColor(playerid,Blue);
                case 2: SetPlayerColor(playerid,Yellow);
                case 3: SetPlayerColor(playerid,Green);
                case 4: SetPlayerColor(playerid,Black);
                case 5: SetPlayerColor(playerid,Purple);
                case 6: SetPlayerColor(playerid,Orange);
                case 7: SetPlayerColor(playerid,Brown);
                case 8: SetPlayerColor(playerid,Gray);
                case 9: SetPlayerColor(playerid,White);
                case 10: SetPlayerColor(playerid,Gold);
                case 11: SetPlayerColor(playerid,Silver);
                case 12: SetPlayerColor(playerid,LightBlue);
                case 13: SetPlayerColor(playerid,GreenYellow);
                case 14: SetPlayerColor(playerid,DarkGreen);
                case 15: SetPlayerColor(playerid,LightYellow);
                case 16: SetPlayerColor(playerid,LightPink);
                case 17: SetPlayerColor(playerid,LightCoral);
                case 18: SetPlayerColor(playerid,DarkGray);
            }
            return 1;
        }
    }
}
Reply


Messages In This Thread
Simple Colors Menu by Misho - by misho1 - 25.07.2011, 06:49
Re: Colors Menu by Misho - by Firzendxiw - 25.07.2011, 06:58
Re: Colors Menu by Misho - by misho1 - 25.07.2011, 07:00
Re: Colors Menu by Misho - by TheYoungCapone - 25.07.2011, 07:27
Re: Colors Menu by Misho - by misho1 - 25.07.2011, 07:29
Re: Colors Menu by Misho - by Ratzu - 05.08.2011, 08:32
Re: Colors Menu by Misho - by Luis- - 06.08.2011, 01:04
Re: Colors Menu by Misho - by Kaperstone - 06.08.2011, 01:27
Re: Colors Menu by Misho - by Lorenc_ - 06.08.2011, 02:56
Re: Colors Menu by Misho - by misho1 - 14.08.2011, 02:04

Forum Jump:


Users browsing this thread: 3 Guest(s)