Closed DaBultz closed 4 years ago
I've gotten some questions elsewhere about this. I'll review Cfx.Text
by the end of the weekend
I was able to draw text on the screen, but it does not behave as it should. https://i.d0p3t.nl/u/C34sJ8BWaA.png
import * as Cfx from 'fivem-js';
let enabled = false;
let test;
setImmediate(() => {
test = new Cfx.Text("", new Cfx.Point(500, 500), 1, new Cfx.Color(255, 255, 0, 0), 0, true);
})
setTick(() => {
if(enabled){
test.draw("DaBultz", new Cfx.Point(500, 500), 1, new Cfx.Color(255, 255, 0, 0), 0, true);
}
if(Cfx.Game.isControlJustPressed(0, Cfx.Control.Context)) {
enabled = !enabled;
}
})
One shouldn't have to call draw()
with more than just the caption (if at all). Therefore, there's little flexibility to this class. I will change this issue to a bug and fix it in the next update.
Hey, currently testing out this libary and trying to have a text appear on the screen using the following code:
Compiles fine and run fine, but no text appears on the screen.