Jump to content
RAGE Multiplayer Community

Graphics Draw Text


BrendonPawn
 Share

Recommended Posts

Translated by Google Translate.

Hello, I come to ask for help on Graphics DrawText because I am not able to display it on the screen. I took the sample code found on Wiki Rage and placed it inside: (server-files/client_packages/{myserver}/hud/time.js) as shown in the code below:

mp.events.add('render', () => {
    // Draw to screen.
    mp.game.graphics.drawText("Text at the top of the screen", [0.5, 0.005], { 
      font: 7, 
      color: [255, 255, 255, 185], 
      scale: [1.2, 1.2], 
      outline: true
    });

    // Draw to world.
    mp.game.graphics.drawText("Text in the world", [-1234, 1337, 15], { 
      font: 7, 
      color: [255, 255, 255, 185], 
      scale: [1.2, 1.2], 
      outline: true,
      centre: true
    });
});

That done, should the texts appear on my screen? Was there a command missing that makes them appear? Am I doing something wrong? I have already studied several codes from other users such as (Money API - rootcause) that uses DrawText but I was not successful in passing part of the code to my project.

Thanks in advance to anyone who wants to help me.

Edited by BrendonPawn
Fix
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...