linnik

Player Synced Data

Recommended Posts

Hi guys,

I haven't found any function that shares data between server and client.

I moved from GT-MP where I had had setEntitySyncedData. 

Edited by linnik

Share this post


Link to post
Share on other sites
3 часа назад, Xabi сказал:
Цитата

mp.players.local.vehicle.getEntitySharedData("name")

getEntitySharedData is not a function.

 

Server:

Цитата

Vehicle.setEntitySharedData("name", "123");

 

Edited by linnik

Share this post


Link to post
Share on other sites
7 minutes ago, linnik said:

getEntitySharedData is not a function.

 

Server:

 

Because what he linked you is C# seeing as you said you moved from GT-MP. SetVariable/getVariable is what you want if you’re using Javascript

https://wiki.rage.mp/index.php?title=Entity::setVariable

https://wiki.rage.mp/index.php?title=Entity::getVariable

just so you know setVariable is serverside only, getVariable is both client and serverside

  • Like 1

Share this post


Link to post
Share on other sites
Только что, MrPancakers сказал:

Because what he linked you is C# seeing as you said you moved from GT-MP. SetVariable/getVariable is what you want if you’re using Javascript

https://wiki.rage.mp/index.php?title=Entity::setVariable

https://wiki.rage.mp/index.php?title=Entity::getVariable

just so you know setVariable is serverside only, getVariable is both client and serverside

Thx a lot.

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.