Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Description : Renders text with a rectangle to view the config flags
- * Preview : http://img4.hostingpics.net/pics/231251201703311045491.jpg
- * Author : ins1de
- */
- public void OnTick(object sender, EventArgs e)
- {
- Function.Call(Hash.DRAW_RECT, 0.85, 0.48, 0.28, 0.95, 26, 26, 26, 100);
- for (int i = 0; i <= 45; i++)
- {
- 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));
- }
- for (int i = 46; i <= 91; i++)
- {
- 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));
- }
- for (int i = 92; i <= 137; i++)
- {
- 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));
- }
- }
- private void Draw(string input, double x, double y)
- {
- Function.Call(Hash.SET_TEXT_FONT, 6);
- Function.Call(Hash.SET_TEXT_SCALE, 0F, 0.45F);
- Function.Call(Hash.SET_TEXT_WRAP, 0.0f, 1.0f);
- Function.Call(Hash.SET_TEXT_CENTRE, 0);
- Function.Call(Hash.SET_TEXT_DROPSHADOW, 1, 255, 255, 255, 255);
- Function.Call(Hash.SET_TEXT_EDGE, 1, 0, 0, 0, 205);
- Function.Call(Hash._SET_TEXT_ENTRY, "STRING");
- Function.Call(Hash._ADD_TEXT_COMPONENT_STRING, input);
- Function.Call(Hash._DRAW_TEXT, x, y);
- Function.Call(Hash.CLEAR_DRAW_ORIGIN);
- }
- private string Beautifulize(bool t)
- {
- if (t) return "~g~True~w~";
- else return "~r~False~w~";
- }
Advertisement
Add Comment
Please, Sign In to add comment