L3gendaryGamers Posted June 14, 2015 Share Posted June 14, 2015 So I hope this question wasn't answered anywhere, if so I'm sorry that I didn't find it. Help would be greatly appreciated though. Coming right to my question/problem I have this code here void CustomRGBPJ(){ bool rgbRed_plus = 0, rgbRed_minus = 0; Vehicle GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, int redCrew, int greenCrew, int blueCrew); AddTitle("Custom RGB Color"); AddNumber("Red", 0, 0, null, rgbRed_plus, rgbRed_minus); if (rgbRed_plus) { if (redCrew + 1 == 255) SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, 0, 0, 0); else SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, (redCrew + 1), 0, 0); return; } else if (rgbRed_minus) { if ((redCrew - 1) == -1) SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, 255, 0, 0); else SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, (redCrew - 1), 0, 0); return; }} I am pretty certain that I am not supposed to put Vehicle in front of the GET_VEHICLE_CUSTOM_PR... but I have no idea how to get this right. BTW I am using MAFINS Menya Base. Thanks Link to comment Share on other sites More sharing options...
Jitnaught Posted June 15, 2015 Share Posted June 15, 2015 (edited) Two things I saw... Vehicle GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, int redCrew, int greenCrew, int blueCrew); should be VEHICLE::GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, &redCrew, &greenCrew, &blueCrew); and you are setting R to redCrew +/- 1, but then setting G and B to 0. Wouldn't it be better to set those to greenCrew and blueCrew? Edited June 15, 2015 by LetsPlayOrDy Link to comment Share on other sites More sharing options...
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