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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.