Guest User

GTA 5 - Config flag research

a guest
Mar 31st, 2017
3,597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.89 KB | None | 0 0
  1. /*
  2. * Description : Renders text with a rectangle to view the config flags
  3. * Preview : http://img4.hostingpics.net/pics/231251201703311045491.jpg
  4. * Author : ins1de
  5. */
  6.  
  7.    public void OnTick(object sender, EventArgs e)
  8.         {
  9.             Function.Call(Hash.DRAW_RECT, 0.85, 0.48, 0.28, 0.95, 26, 26, 26, 100);
  10.              for (int i = 0; i <= 45; i++)
  11.              {
  12.                  Draw("Flag ~b~" + i + "~w~ : ~y~" + Beautifulize(Function.Call<bool>(Hash.GET_PED_CONFIG_FLAG, Game.Player.Character, i, false)), 0.75, 0.02 + ((i-0) * 0.02));
  13.              }
  14.  
  15.             for (int i = 46; i <= 91; i++)
  16.             {
  17.                 Draw("Flag ~b~" + i + "~w~ : ~y~" + Beautifulize(Function.Call<bool>(Hash.GET_PED_CONFIG_FLAG, Game.Player.Character, i, false)), 0.82, 0.02 + ((i - 46) * 0.02));
  18.             }
  19.  
  20.             for (int i = 92; i <= 137; i++)
  21.             {
  22.                 Draw("Flag ~b~" + i + "~w~ : ~y~" + Beautifulize(Function.Call<bool>(Hash.GET_PED_CONFIG_FLAG, Game.Player.Character, i, false)), 0.89, 0.02 + ((i - 92) * 0.02));
  23.             }
  24.         }
  25.  
  26.      private void Draw(string input, double x, double y)
  27.         {
  28.             Function.Call(Hash.SET_TEXT_FONT, 6);
  29.             Function.Call(Hash.SET_TEXT_SCALE, 0F, 0.45F);
  30.             Function.Call(Hash.SET_TEXT_WRAP, 0.0f, 1.0f);
  31.             Function.Call(Hash.SET_TEXT_CENTRE, 0);
  32.             Function.Call(Hash.SET_TEXT_DROPSHADOW, 1, 255, 255, 255, 255);
  33.             Function.Call(Hash.SET_TEXT_EDGE, 1, 0, 0, 0, 205);
  34.             Function.Call(Hash._SET_TEXT_ENTRY, "STRING");
  35.             Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, input);
  36.             Function.Call(Hash._DRAW_TEXT, x, y);
  37.             Function.Call(Hash.CLEAR_DRAW_ORIGIN);
  38.         }
  39.  
  40.         private string Beautifulize(bool t)
  41.         {
  42.             if (t) return "~g~True~w~";
  43.             else return "~r~False~w~";
  44.         }
Advertisement
Add Comment
Please, Sign In to add comment