Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral


  • Rank
  1. I don't have error , I failed to create this part of code only cause I don't know how to check decimals decrease or increase to give or take money from player , I added this code in client and server function round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end and this is trigger using this function in gridlist , triggerServerEvent("test",localPlayer,round(d.diff[2
  2. This code by timer increase or decrease okay? I don't now how to give player money or take money by this value --- This is trigger Client triggerServerEvent( "onClientStockTransaction", localPlayer, n ) ------------------------------- addEvent( "onClientStockTransaction", true ) addEventHandler( "onClientStockTransaction", root, function( money,n ) local take = exports.global:getMoney(source, tonumber(money)-n) triggerClientEvent( source, "onConfirmPayment", source ) if decimals >= 0 then exports.global:takeMoney( source, tonumber(take)-n ) else -- decimals === export
  3. I already tried but I failed , I need to take player money or give with value in gridlist
  4. I need if value in gridlist change to green give player money with this value or lose his money with this value if it red Like forex , I want to know check value with decimals
  5. Help please ? ,
  6. Hello guys , I started working on the stocks system, but I have some problems. I want when the stock is positive ( green ), he gives him money, and when the stock is negative ( red ), he takes money from the player, that is, he buys a stock, and if he loses he loses money , like forex Thanks , --- Gridlist Value Test ---- for i,d in pairs(data) do local r = dgsGridListAddRow(GUIEditor.gridlist[1]) dgsGridListSetItemText(GUIEditor.gridlist[1], r, 1, d.name, false, false ) dgsGridListSetItemText(GUIEditor.gridlist[1], r, 2, "$ "..round(d.pps,2)*totalMid


    How can I make mutli-faction in roleplay (Caharacter have more than 1 faction to 3)
  • Create New...