Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[CLIENT]Draw(Line/Color)
#1
[Image: Oy81gsU.jpg]
[Image: 9lvuNiq.jpg]
'~n' - new line
'{#hex}' - color text

Function

Code:
G_Draw(x(px), y(px), font, text[, r, g, b]);
G_Draw.visible(bool);
G_Draw.isVisible;//return bool
G_Draw.setPosition(x, y);//(pixel)
G_Draw.getPosition()// return table {x, y}
G_Draw.top()
toColor(r, g, b);//return hex code


Example

Squirrel Script
  1. local text1 = @"Lorem ipsum dolor sit amet, consectetur adipiscing elit.
  2. ~nFusce posuere, justo quis venenatis faucibus, lorem urna interdum tellus,
  3. ~neget mollis sem turpis quis felis. Sed et nibh ac felis sodales porta.
  4. ~n{#8b86d0}Phasellus {#827e4f}porta {#b5413b}tempor {#f31dd7}tellus, {#2193b7}sit {#86f1b6}amet {#ffcf19}ullamcorper {#432380}tortor {#23805e}pulvinar {#FFFFFF}eu.
  5. ~nIn turpis lorem, malesuada sit amet velit commodo, malesuada efficitur velit.
  6. ~nFusce in euismod {#ed00ef}lectus, sit amet lobortis tortor. {#ffffff}Praesent nunc est, vulputate eget nibh quis, auctor porta lorem.
  7. ~nSed risus lorem, ultrices in nunc eu, malesuada lacinia tellus. Sed congue nibh id tortor sagittis hendrerit.
  8. ~nAliquam erat volutpat. {#F60005}Curabitur pharetra pellentesque lobortis.{#55ff12} Duis auctor neque nec volutpat ultrices.
  9. ~n{#FFFFFF}Donec efficitur, lectus a sollicitudin accumsan, mauris neque mattis turpis, et convallis lacus justo ac risus.
  10. ~nAenean tincidunt, nulla quis elementum placerat, leo enim lobortis leo, nec lobortis arcu quam consectetur justo";
  11.  
  12. local example1 = G_Draw(100, 300, "FONT_OLD_10_WHITE_HI.TGA", text1)
  13. local example2 = G_Draw(600, 100, "FONT_OLD_10_WHITE_HI.TGA", "My Text "+toColor(250, 0, 0)+"red", 0, 0, 255)
  14. local example3 = G_Draw(100, 800, "FONT_OLD_20_WHITE.TGA", @"My {#FFFFFF}Text
  15. ~n{#ceff5c}New line
  16. ~n{#F60005}E{#aadd20}x{#aaffff}a{#ed00ef}m{#ff7800}p{#2900ff}l{#F60005}e {#50cc29}T{#cc298a}e{#F60005}x{#50cc29}t
  17. ", 255, 0, 0)
  18.  
  19. local function initHandler()
  20. {
  21.    example1.visible(true);
  22.    example2.visible(true);
  23.    example3.visible(true);
  24. }
  25. addEventHandler("onInit", initHandler)



Script https://pastebin.com/kzQ75PUu
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [New G2O][Client] Free Camera Patrix 2 2,215 06.05.2020, 18:53
Last Post: Patrix
  [Client] Version check Quarchodron 2 2,032 25.08.2019, 14:06
Last Post: Quarchodron
  [Client] GUI Creator Quarchodron 6 3,937 12.08.2019, 23:05
Last Post: Arkhan
  [New G2O][Client-Side] bindKey Patrix 6 5,343 14.11.2018, 02:32
Last Post: Patrix
  [New G2O][Client-Side] OOP Camera Movement Patrix 1 2,491 20.10.2018, 14:22
Last Post: Patrix
  [0.1.4.*] [client/server] Simple anty-cheat Profesores 8 5,883 20.03.2018, 19:16
Last Post: Patrix
  [0.1.3] [client/server] BotCreator HammelGammel 22 15,217 08.02.2018, 22:02
Last Post: HammelGammel
  [0.1.3] [client/server] Utility Scripts HammelGammel 1 3,349 27.01.2018, 14:03
Last Post: HammelGammel
  [New G2O][Client-Side] Key Combination Patrix 1 2,292 23.12.2017, 13:16
Last Post: Patrix
  [G2O v.0.1.0][Client-Side] Notice Board Quarchodron 0 1,891 27.06.2017, 14:28
Last Post: Quarchodron

Forum Jump:


Users browsing this thread: 1 Guest(s)