wbty

How to update drawText

Recommended Posts

Hello, can someone show me proper example how to update drawText from serverside?

For example:

//server
player.call(`update`, text)

//client
mp.game.graphics.drawText("text", [0.88, 0.16], {font: 4,color: [255,255,255,255],scale: [0.5,0.5],outline: false});

mp.events.add('update', (text) =>
{
     //some code for update
});

 

Share this post


Link to post
Share on other sites

Hello!

Server:

setInterval(updateRender, 5000);

function updateRender()
{
  player.call('update',text)
}
Client:
mp.events.add('update', (text) =>
{
     mp.game.graphics.drawText("text", [0.88, 0.16], {font: 4,color: [255,255,255,255],scale: [0.5,0.5],outline: false});
});
 
Edited by Voidbrew
  • Like 1

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.