Guest User

Simple RGB changer mod for GTA 5 PC

a guest
Jul 10th, 2015
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.34 KB | None | 0 0
  1. /*
  2. THIS FILE IS A MODDED VERSION OF A FILE PART OF GTA V SCRIPT HOOK SDK
  3. http://dev-c.com
  4. (C) Alexander Blade 2015
  5. */
  6.  
  7. #include "script.h"
  8.  
  9. int red, green, blue;
  10.  
  11. void updateConfigValues(){
  12.     red = GetPrivateProfileInt("Vehicle_Color", "red", -1, ".\\VehicleColor.ini");
  13.     green = GetPrivateProfileInt("Vehicle_Color", "green", -1, ".\\VehicleColor.ini");
  14.     blue = GetPrivateProfileInt("Vehicle_Color", "blue", -1, ".\\VehicleColor.ini");
  15. }
  16.  
  17. void update_features()
  18. {
  19.     while (ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID()) || PLAYER::IS_PLAYER_BEING_ARRESTED(PLAYER::PLAYER_ID(), TRUE))
  20.         WAIT(0);
  21.  
  22.     Ped playerPed = PLAYER::PLAYER_PED_ID();
  23.     BOOL bPlayerExists = ENTITY::DOES_ENTITY_EXIST(playerPed);
  24.  
  25.     if (bPlayerExists){
  26.         if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true)){
  27.             Vehicle playerVeh = PED::GET_VEHICLE_PED_IS_IN(playerPed, true);
  28.  
  29.             VEHICLE::SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(playerVeh, red, green, blue);
  30.             VEHICLE::SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(playerVeh, red, green, blue);
  31.             VEHICLE::SET_VEHICLE_TYRE_SMOKE_COLOR(playerVeh, red, green, blue);
  32.             VEHICLE::_SET_VEHICLE_NEON_LIGHTS_COLOUR(playerVeh, red, green, blue);
  33.         }
  34.     }
  35. }
  36.  
  37. void main()
  38. {
  39.  
  40.     while (true)
  41.     {
  42.         updateConfigValues();
  43.         update_features();
  44.         WAIT(2000);
  45.     }
  46.  
  47. }
  48.  
  49. void ScriptMain()
  50. {
  51.     srand(GetTickCount());
  52.     main();
  53. }
Advertisement
Add Comment
Please, Sign In to add comment