Assassin-NL Posted February 28, 2010 Share Posted February 28, 2010 is it possible to edit the driver2/server.lua " https://community.multitheftauto.com/index.php?p= ... ils&id=612 " it sorts teams and it gives players colours. but is it possible to make the cars of the team the same colour as the name? thanks Link to comment
50p Posted February 28, 2010 Share Posted February 28, 2010 No, because vehicle colours are not set with RGB but just a number (from 1-126 but can go higher). So, it's not that easy to do it especially with colours (1-126) not being in colour order. Link to comment
Assassin-NL Posted March 1, 2010 Author Share Posted March 1, 2010 No, because vehicle colours are not set with RGB but just a number (from 1-126 but can go higher). So, it's not that easy to do it especially with colours (1-126) not being in colour order. ah ok thanks Link to comment
karlis Posted March 1, 2010 Share Posted March 1, 2010 well, i ahve pretty simillar problem, have any1 idea how to convert they to rgb or hex and save as table?(no i dont feel like copy&paste 126 times) Link to comment
50p Posted March 2, 2010 Share Posted March 2, 2010 well, i ahve pretty simillar problem, have any1 idea how to convert they to rgb or hex and save as table?(no i dont feel like copy&paste 126 times) Your problem is not similar, it's opposite of what Assassin-NL wants. He wants to convert RGB to gta colour id and you want to convert colour id to RGB. If you open Vehicle Colors site and right-click "View source code" (or something similar), you'll find the list of all colours, just scroll down a bit. The GTA colour indices are not set in any kind of pattern so it's not easy to calculate RGB based on colour index without knowing the their RGB values. Link to comment
robhol Posted March 2, 2010 Share Posted March 2, 2010 Nitpicking: it's not "not easy" to calc GTA index codes -> RGB, it's not possible at all. What you need is a comparison table. Link to comment
karlis Posted March 2, 2010 Share Posted March 2, 2010 but u say that theres posible colors 126< that are working too? Link to comment
karlis Posted March 2, 2010 Share Posted March 2, 2010 got xml (ty 50p), and tought someone else could like see it too, so here it is <root> <carcolors hex="0x000000" colorid="0"/> <carcolors hex="0xFFFFFF" colorid="1"/> <carcolors hex="0x2A77A1" colorid="2"/> <carcolors hex="0x840510" colorid="3"/> <carcolors hex="0x253739" colorid="4"/> <carcolors hex="0x87446F" colorid="5"/> <carcolors hex="0xD78D10" colorid="6"/> <carcolors hex="0x4C75B7" colorid="7"/> <carcolors hex="0xBEBEC6" colorid="8"/> <carcolors hex="0x5E7072" colorid="9"/> <carcolors hex="0x46597A" colorid="10"/> <carcolors hex="0x646A78" colorid="11"/> <carcolors hex="0x5D7E8D" colorid="12"/> <carcolors hex="0x58595B" colorid="13"/> <carcolors hex="0xDBD6DA" colorid="14"/> <carcolors hex="0x9CA1A4" colorid="15"/> <carcolors hex="0x335F3E" colorid="16"/> <carcolors hex="0x730F1B" colorid="17"/> <carcolors hex="0x7B092A" colorid="18"/> <carcolors hex="0xA09D94" colorid="19"/> <carcolors hex="0x3B4E78" colorid="20"/> <carcolors hex="0x722E3D" colorid="21"/> <carcolors hex="0x691E3C" colorid="22"/> <carcolors hex="0x96918D" colorid="23"/> <carcolors hex="0x515459" colorid="24"/> <carcolors hex="0x3F3E44" colorid="25"/> <carcolors hex="0xA5A9A8" colorid="26"/> <carcolors hex="0x645C5A" colorid="27"/> <carcolors hex="0x3D4B68" colorid="28"/> <carcolors hex="0x969591" colorid="29"/> <carcolors hex="0x422021" colorid="30"/> <carcolors hex="0x5F262C" colorid="31"/> <carcolors hex="0x8494AB" colorid="32"/> <carcolors hex="0x767C7C" colorid="33"/> <carcolors hex="0x646464" colorid="34"/> <carcolors hex="0x5A5752" colorid="35"/> <carcolors hex="0x252527" colorid="36"/> <carcolors hex="0x2E3A36" colorid="37"/> <carcolors hex="0x93A396" colorid="38"/> <carcolors hex="0x6D7B88" colorid="39"/> <carcolors hex="0x231918" colorid="40"/> <carcolors hex="0x70655F" colorid="41"/> <carcolors hex="0x7C1C2A" colorid="42"/> <carcolors hex="0x610915" colorid="43"/> <carcolors hex="0x193826" colorid="44"/> <carcolors hex="0x5D1B1F" colorid="45"/> <carcolors hex="0x9D9872" colorid="46"/> <carcolors hex="0x7A7561" colorid="47"/> <carcolors hex="0x989586" colorid="48"/> <carcolors hex="0xACB0B1" colorid="49"/> <carcolors hex="0x848887" colorid="50"/> <carcolors hex="0x305045" colorid="51"/> <carcolors hex="0x4D6168" colorid="52"/> <carcolors hex="0x162248" colorid="53"/> <carcolors hex="0x282F4B" colorid="54"/> <carcolors hex="0x7D6356" colorid="55"/> <carcolors hex="0x9DA4AC" colorid="56"/> <carcolors hex="0x9C8D70" colorid="57"/> <carcolors hex="0x6E1823" colorid="58"/> <carcolors hex="0x4E6881" colorid="59"/> <carcolors hex="0x9C9D98" colorid="60"/> <carcolors hex="0x927347" colorid="61"/> <carcolors hex="0x651C27" colorid="62"/> <carcolors hex="0x949EA0" colorid="63"/> <carcolors hex="0xA5A7A6" colorid="64"/> <carcolors hex="0x8F8C45" colorid="65"/> <carcolors hex="0x34191E" colorid="66"/> <carcolors hex="0x6A798C" colorid="67"/> <carcolors hex="0xAAAD8E" colorid="68"/> <carcolors hex="0xAB998F" colorid="69"/> <carcolors hex="0x851F2D" colorid="70"/> <carcolors hex="0x708298" colorid="71"/> <carcolors hex="0x575852" colorid="72"/> <carcolors hex="0x99A790" colorid="73"/> <carcolors hex="0x601A24" colorid="74"/> <carcolors hex="0x20202C" colorid="75"/> <carcolors hex="0xA4A095" colorid="76"/> <carcolors hex="0xAB9D83" colorid="77"/> <carcolors hex="0x78222B" colorid="78"/> <carcolors hex="0x0E306D" colorid="79"/> <carcolors hex="0x722B3F" colorid="80"/> <carcolors hex="0x7C71CE" colorid="81"/> <carcolors hex="0x741c28" colorid="82"/> <carcolors hex="0x1f2e33" colorid="83"/> <carcolors hex="0x4e322f" colorid="84"/> <carcolors hex="0x7c1c45" colorid="85"/> <carcolors hex="0x2e5b20" colorid="86"/> <carcolors hex="0x395a83" colorid="87"/> <carcolors hex="0x6c2838" colorid="88"/> <carcolors hex="0xa6a28f" colorid="89"/> <carcolors hex="0xafb1b0" colorid="90"/> <carcolors hex="0x364155" colorid="91"/> <carcolors hex="0x6d6d6f" colorid="92"/> <carcolors hex="0x0f6a89" colorid="93"/> <carcolors hex="0x204b6b" colorid="94"/> <carcolors hex="0x2a3e57" colorid="95"/> <carcolors hex="0x9ba09e" colorid="96"/> <carcolors hex="0x6d8497" colorid="97"/> <carcolors hex="0x4e5d60" colorid="98"/> <carcolors hex="0xad9b80" colorid="99"/> <carcolors hex="0x406c8f" colorid="100"/> <carcolors hex="0x1f253b" colorid="101"/> <carcolors hex="0xab9176" colorid="102"/> <carcolors hex="0x124572" colorid="103"/> <carcolors hex="0x96816c" colorid="104"/> <carcolors hex="0x64686b" colorid="105"/> <carcolors hex="0x115083" colorid="106"/> <carcolors hex="0xa19984" colorid="107"/> <carcolors hex="0x385694" colorid="108"/> <carcolors hex="0x525660" colorid="109"/> <carcolors hex="0x7f6856" colorid="110"/> <carcolors hex="0x8b929a" colorid="111"/> <carcolors hex="0x596f88" colorid="112"/> <carcolors hex="0x473531" colorid="113"/> <carcolors hex="0x456150" colorid="114"/> <carcolors hex="0x730a28" colorid="115"/> <carcolors hex="0x223558" colorid="116"/> <carcolors hex="0x640e1b" colorid="117"/> <carcolors hex="0xa3adc6" colorid="118"/> <carcolors hex="0x6a5854" colorid="119"/> <carcolors hex="0x9c8b81" colorid="120"/> <carcolors hex="0x620b1d" colorid="121"/> <carcolors hex="0x5b5d5f" colorid="122"/> <carcolors hex="0x634427" colorid="123"/> <carcolors hex="0x731926" colorid="124"/> <carcolors hex="0x1c376d" colorid="125"/> <carcolors hex="0xec6bae" colorid="126"/> </root> Link to comment
50p Posted March 2, 2010 Share Posted March 2, 2010 but u say that theres posible colors 126< that are working too? There are loads of colours which are not documented. Make a simple command to change your vehicle colour and test values <126 or use the one below. There are some interesting colours. addCommandHandler( "colour", function( plr, _, col ) col = tonumber( col ); if col then local veh = getPlayerOccupiedVehicle( plr ) if veh then setVehicleColor( veh, col, col, col, col ); end end end ) Link to comment
karlis Posted March 2, 2010 Share Posted March 2, 2010 k ill try btw i already have carcolor script i even uploaded, and im using those rgb values to make chat outputs be same color as car, and to make gui, where all colors would be made with dxDrawRecentangle , and other qurstion: if ill draw dxrecentangle in front of button i still can press button? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now