SA-MP Forums Archive
[FilterScript] [0.3x] zDivines Wheel Rotator [Unique] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [0.3x] zDivines Wheel Rotator [Unique] (/showthread.php?tid=431610)



[0.3x] zDivines Wheel Rotator [Unique] - zDivine - 19.04.2013

zDivines Wheel Rotator


Information:
This script is pretty simple. You can add up to MAX_VEHICLEWHEELS to your rotator. You may then use /enablewr and /disablewr to control the rotator. When you are inside a vehicle, the wheels will automatically cycle through each wheel ID, changing your vehicles wheels. This may not be good for RP servers, but might be stylish for freeroam or stunt servers. Hope you enjoy.

Features: Commands: Includes: Notes & Contact:
Please do not edit this script, or remove the credits. You may contact me through Skype (mercenary.lf), or forum PM.

Download:
Pastebin


Re: [0.3x] zDivines Wheel Rotator [Unique] - Om3n - 19.04.2013

have you got any screens or video?


Re: [0.3x] zDivines Wheel Rotator [Unique] - zDivine - 19.04.2013

Quote:
Originally Posted by Om3n
Посмотреть сообщение
have you got any screens or video?
No I do not. There really isn't any need, as you can just test it on a home server. It's rather simple.


Re: [0.3x] zDivines Wheel Rotator [Unique] - Pottus - 19.04.2013

Код:
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.


Re: [0.3x] zDivines Wheel Rotator [Unique] - zDivine - 19.04.2013

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Код:
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.
1. Because sscanf will return a warning in the prompt, "sscanf warning: no default value found."

2. Are you serious? because if the error is throw there, it needs to return there, not keep going to the end of the code.


Re: [0.3x] zDivines Wheel Rotator [Unique] - Ibrahim.E - 19.04.2013

Good Job , I will test it right now .


Re: [0.3x] zDivines Wheel Rotator [Unique] - Kilos - 17.05.2013

Good work.