[SR]mR.EmiN Posted April 11, 2011 Share Posted April 11, 2011 (edited) addEventHandler("onNotifyPlayerReady", getRootElement(), function() local playerTeam = getPlayerTeam" class="kw2">getPlayerTeam (source) local PVeh= getPedOccupiedVehicle(source) if ( playerTeam ) then local teamName = getTeamName(playerTeam) if teamName == "[T1]" then setVehicleColor(PVeh,30,255,0) setBlipColor(155,13,43) end end end) setVehicleColor(PVeh,30,255,0) setBlipColor(155,13,43) have error pls help. Edited April 11, 2011 by Guest Link to comment
Chlorek Posted April 11, 2011 Share Posted April 11, 2011 addEventHandler("onNotifyPlayerReady", getRootElement(), function() local playerTeam = getPlayerTeam (source) local PVeh= getPedOccupiedVehicle(source) if ( playerTeam ) then local teamName = getTeamName(playerTeam) if teamName == "[T1]" then setVehicleColor( PVeh, color1, color2, color3, color4 ) setBlipColor(155,13,43) -- where is blip create?? add blip name be4 color code end end end) Link to comment
Kenix Posted April 11, 2011 Share Posted April 11, 2011 https://wiki.multitheftauto.com/wiki/SetBlipColor Link to comment
DakiLLa Posted April 11, 2011 Share Posted April 11, 2011 https://wiki.multitheftauto.com/wiki/SetBlipColor What actually are you trying to say with this link? You could ever explain, what he should take a look on. There are some more issues in his code, not only this one. To the author: 1) about setVehicleColor function: you can't user RGB style in MTA 1.0.5, this works only with MTA 1.1 unstable. So, to get it work, you should do: setVehicleColor( pVeh, 86, 86, 0, 0 ) --id 86 is green color, but not so toxic like yours (30, 255, 0) 2) I assume you have attached blip to your vehicle, so you have to check all the attached elements and if the type of the element is 'blip', then set it's color: for k, el in ipairs( getAttachedElements( pVeh ) ) do if getElementType( el ) == "blip" then setBlipColor( el, 155,13,43, 255 ) --this function also has the 4th parameter: alpha end end Link to comment
Moderators Citizen Posted April 12, 2011 Moderators Share Posted April 12, 2011 https://wiki.multitheftauto.com/wiki/SetBlipColor What actually are you trying to say with this link? You could ever explain, what he should take a look on. There are some more issues in his code, not only this one. He means that [sR]mR.EmiN have to see how to use this function ( so the syntax or the arguments needed ) 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