Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/06/21 in File Comments

  1. i would add this in client data, so if the user opens the menu, and click enter the error "you dont have enough money" dont show up (manually fix if user switch one car) before fix: ui.IndexChange.on((index) => { mp.players.local.vehicleShop.model = data[Object.keys(data)[index + 1]].hash; mp.players.local.vehicleShop.price = data[Object.keys(data)[index + 1]].price; }); ui.ItemSelect.on((item, index) => { mp.events.callRemote("buyVehicleShop", carShopType, JSON.stringify({ "model": mp.players.local.vehicleShop.model, "price": mp.players.local.vehicleShop.price })); }); after fix: ui.IndexChange.on((index) => { mp.players.local.vehicleShop.model = data[Object.keys(data)[index + 1]].hash; mp.players.local.vehicleShop.price = data[Object.keys(data)[index + 1]].price; }); ui.ItemSelect.on((item, index) => { mp.players.local.vehicleShop.model = data[Object.keys(data)[index + 1]].hash; mp.players.local.vehicleShop.price = data[Object.keys(data)[index + 1]].price; mp.events.callRemote("buyVehicleShop", carShopType, JSON.stringify({ "model": mp.players.local.vehicleShop.model, "price": mp.players.local.vehicleShop.price })); });
    1 point
×
×
  • Create New...