extlatvia Posted March 30, 2012 Posted March 30, 2012 Hey. I want ask. What is script to set in server car color only for me. ? I saw something like this on other servers.
sckatchof Posted March 30, 2012 Posted March 30, 2012 Use this functions : createVehicle setVehicleColor
DNL291 Posted March 30, 2012 Posted March 30, 2012 Use this functions : createVehicle setVehicleColor he wants the script to not the function.
X-SHADOW Posted March 30, 2012 Posted March 30, 2012 my script https://community.multitheftauto.com/index.php?p= ... ls&id=2523
sckatchof Posted March 30, 2012 Posted March 30, 2012 my script https://community.multitheftauto.com/index.php?p= ... ls&id=2523 but he dont want lights for vehicles.
extlatvia Posted March 30, 2012 Author Posted March 30, 2012 But i want it for race gamemode. And if someone donate he can get Car color what he want.
DNL291 Posted March 30, 2012 Posted March 30, 2012 https://community.multitheftauto.com/index.php?p= ... ls&id=3247
sckatchof Posted March 30, 2012 Posted March 30, 2012 But i want it for race gamemode. And if someone donate he can get Car color what he want. you mean if he is VIP can get color what he want ?
extlatvia Posted March 30, 2012 Author Posted March 30, 2012 I think i can set to him color what he want. Or like to my car. And that color is all time to my car.
drk Posted March 30, 2012 Posted March 30, 2012 oh its hard you must enter scripting world lol It's not so hard. -- Anyway, if you're interested in creating your own, if you need help, post in Scripting section.
extlatvia Posted March 30, 2012 Author Posted March 30, 2012 then no one can give script ? Someone give me function checkName() local players = getElementsByType("player") for theKey, thePlayer in ipairs(players) do auto = getPedOccupiedVehicle(thePlayer) thePlayerAcc = getPlayerAccount(thePlayer) for i = 1, #names do if auto and (getAccountName(thePlayerAcc) == names[i][1] ) then setVehicleColor(auto, names[i][2], names[i][3], names[i][4], names[i][5], names[i][6], names[i][7]) setVehicleHeadLightColor (auto, names[i][2], names[i][3], names[i][4], names[i][5], names[i][6], names[i][7]) setVehicleOverrideLights (auto, 2) end end end end addEvent("checkColour", true) addEventHandler("checkColour", getRootElement(), checkName) But idk how set car color for my Account . I am noob in Scripting.
X-SHADOW Posted March 30, 2012 Posted March 30, 2012 this well get all players Account and set There Car Lights do you want it for all or just for you = admin ?
drk Posted March 30, 2012 Posted March 30, 2012 We will not give you the full script. Script by yourself. We only help making.
extlatvia Posted March 30, 2012 Author Posted March 30, 2012 X-SHADOW just for me only car color. But idk how in that script add my Account what i have in server and car color.
X-SHADOW Posted March 30, 2012 Posted March 30, 2012 addEventHandler( 'onPlayerLogin', root, function() local veh = getPedOccupiedVehicle( source ); if veh and isObjectInACLGroup( 'user.'..getPlayerName( source ), aclGetGroup( 'Admin' ) ) then setVehicleColor( veh, 0, 0, 0, 0 ); --color it with black end; end );
drk Posted March 30, 2012 Posted March 30, 2012 LOOOOOL Your code is wrong again X-SHADOW. addEventHandler ( 'onPlayerLogin', root, function ( _, acc ) if ( getPedOccupiedVehicle ( source ) and isObjectInACLGroup ( 'user.' .. getAccountName ( acc ), aclGetGroup ( 'Admin' ) ) ) then setVehicleColor ( getPedOccupiedVehicle ( source ), R, G, B ); end end )
drk Posted March 30, 2012 Posted March 30, 2012 1st - You need check if account name is in ACL Group, not player name. 2nd - setVehicleColor have three optional arguments: 2 - [ R, G, B ]; 3 - [ R, G, B ]; 4 - [ R, G, B ] And you're using the first required color package and COLOR R of argument 2 ( optional ).
extlatvia Posted March 31, 2012 Author Posted March 31, 2012 And how i can add my account name there , and set first / second car color ? (
drk Posted March 31, 2012 Posted March 31, 2012 The code will get automatically your account on login, in my code change R, G, B to your color and add R, G, B again with second rgb color.
DNL291 Posted March 31, 2012 Posted March 31, 2012 r2 g2 b2 is optional, do not need to add if you want to change only the first color
drk Posted March 31, 2012 Posted March 31, 2012 r2 g2 b2 is optional, do not need to add if you want to change only the first color and set first / second car color ? (
Dreamer Posted March 31, 2012 Posted March 31, 2012 How to bind car colour to specific user account? I'm interested in this script too
drk Posted March 31, 2012 Posted March 31, 2012 (edited) local theAccount = '' addCommandHandler ( 'account', function ( ped, cmd, acc ) if ( not acc ) then return end; theAccount = tostring ( acc ) end ) addEventHandler ( 'onPlayerLogin', root, function ( _, acc ) if ( getAccountName ( acc ) == theAccount ) then setVehicleColor ( getPedOccupiedVehicle ( source ), R, G, B ); end end ) Example: /account dream On player login will set vehicle color if account is 'dream'. Edited March 31, 2012 by Guest
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