failin3 Posted May 4, 2015 Share Posted May 4, 2015 I can't seem to find out how to draw text on the screen like the native trainer does when adding money, you get a little popup saying you have added money. I looked at the code and I don't think I know how to replicate this in LUA, anyone knows how to do it. Here's the code I am talking about: void set_status_text(std::string str, DWORD time = 2500, bool isGxtEntry = false) { statusText = str; statusTextDrawTicksMax = GetTickCount() + time; statusTextGxtEntry = isGxtEntry; } Link to comment Share on other sites More sharing options...
skyrayfox Posted May 5, 2015 Share Posted May 5, 2015 (edited) This should get you started: function someluafile.draw_text(text, x, y, scale) UI.SET_TEXT_FONT(1) UI.SET_TEXT_SCALE(scale, scale) UI.SET_TEXT_COLOUR(255, 255, 255, 255) UI.SET_TEXT_WRAP(0.0, 1.0) UI.SET_TEXT_CENTRE(false) UI.SET_TEXT_DROPSHADOW(2, 2, 0, 0, 0) UI.SET_TEXT_EDGE(1, 0, 0, 0, 205) UI._SET_TEXT_ENTRY("STRING") UI._ADD_TEXT_COMPONENT_STRING(text) UI._DRAW_TEXT(y, x)end then you call the function with: someluafile.draw_text("yourtext", 0.5, 0.45, 0.5) Edited May 5, 2015 by skyrayfox failin3 1 Link to comment Share on other sites More sharing options...
failin3 Posted May 5, 2015 Author Share Posted May 5, 2015 This should get you started: function someluafile.draw_text(text, x, y, scale) UI.SET_TEXT_FONT(1) UI.SET_TEXT_SCALE(scale, scale) UI.SET_TEXT_COLOUR(255, 255, 255, 255) UI.SET_TEXT_WRAP(0.0, 1.0) UI.SET_TEXT_CENTRE(false) UI.SET_TEXT_DROPSHADOW(2, 2, 0, 0, 0) UI.SET_TEXT_EDGE(1, 0, 0, 0, 205) UI._SET_TEXT_ENTRY("STRING") UI._ADD_TEXT_COMPONENT_STRING(text) UI._DRAW_TEXT(y, x)end then you call the function with: someluafile.draw_text("yourtext", 0.5, 0.45, 0.5) Thanks, I did not see some of these entries when browsing the natives 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