[FilterScript] [0.3x] zDivines Wheel Rotator [Unique]
#4

Код:
stock IsValidWheelID(wheelid)
{
        switch(wheelid)
        {
            case 1073, 1074: return 1;
            case 1053: return 1;
            case 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085: return 1;
            case 1097, 1098: return 1;
            case 1025: return 1;
                default: return 0;
        }
        return 0;
}
No need for a default case since your going to return 0; anways.

And.....

Код:
                SendClientMessage(playerid, X11_RED, "ERROR: That slot doesn't contain a wheel.");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, X11_RED, "ERROR: Invalid slot.");
            return 1;
        }
        return 1;
Why the need for all those returns it's going going to return 1; when it reaches the end of the scope your inflating your script with unneeded lines of code.
Reply


Messages In This Thread
[0.3x] zDivines Wheel Rotator [Unique] - by zDivine - 19.04.2013, 03:38
Re: [0.3x] zDivines Wheel Rotator [Unique] - by Om3n - 19.04.2013, 04:11
Re: [0.3x] zDivines Wheel Rotator [Unique] - by zDivine - 19.04.2013, 04:15
Re: [0.3x] zDivines Wheel Rotator [Unique] - by Pottus - 19.04.2013, 04:29
Re: [0.3x] zDivines Wheel Rotator [Unique] - by zDivine - 19.04.2013, 17:40
Re: [0.3x] zDivines Wheel Rotator [Unique] - by Ibrahim.E - 19.04.2013, 17:41
Re: [0.3x] zDivines Wheel Rotator [Unique] - by Kilos - 17.05.2013, 06:08

Forum Jump:


Users browsing this thread: 3 Guest(s)