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

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:
  • MAX_VEHICLEWHEELS - Allows you to change how the max number of wheels a user can have on their rotator.
  • WHEEL_CHANGE_TIMER - Allows you to set how fast each wheel rotates. Timer is in milliseconds.
Commands:
  • /wrhelp - Provides you with a full list of available commands in the script.
  • /listwheels - Provides you with a full list of currently added wheels on your rotator.
  • /addwheel [wheelid] - Adds a wheel to your wheel rotator.
  • /removewheel [slot] - Removes a wheel from your rotator. (Also sends a list of wheels with slot number upon typing command.)
  • /enablewr - Enables your wheel rotator.
  • /disablewr - Disables your wheel rotator.
  • /wheellist - Provides you with a full list of available wheel ID's to choose from. Also includes the wheels name.
Includes:
  • sscanf2 - Credits to ******
  • zcmd - Credits to Zeex
  • YSI\y_colours - Credits to ******
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
Reply
#2

have you got any screens or video?
Reply
#3

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.
Reply
#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
#5

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.
Reply
#6

Good Job , I will test it right now .
Reply
#7

Good work.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)