Sign in to follow this  
Skeizy

Change data through client side

Recommended Posts

Posted (edited)

Hi, i'm working at vehicle system and was thinking about how to save data about cars. I looked at some posts at forum, but they were saving that in vehicle array (vehicle.owner = player.name). 

I just want to ask if its possible to edit vehicle data through client side and what's the best way to store data.

And also i want to know if its possible to edit client script white game's running, i mean when is player connected to server.

I just had a idea to do it through array like that and loop that if someone enter car, but i'm not sure:

var vehid = mp.vehicles.new(mp.joaat(vehicle), position,
{
  heading: player.heading,
  dimension: player.dimension,
  locked: false,
  engine: false,
  numberPlate: "SPZ-1748",
  color: [[50, 255, 0],[90, 255, 0]]
});

p_vehicles[vehid.id] = {
  heading: player.heading,
  dimension: player.dimension,
  owner: player.name,
  locked: false,
  engine: false,
  numberPlate: "SPZ-1748",
  color: [[50, 255, 0],[90, 255, 0]]
}

 

Thanks.

 

Edited by Skeizy

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.