• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About BlockFighter

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. The 'cost' variable only points to 0 in dxDraw.
  2. Hi! I have a problem with what is on EventHandler on the server side I can not query on the client side as a variable how can I solve this problem? Because it gives a bug to ''attempt to concatenate local 'cost'" Global Code: shops = { {"Phone1", 1, 2, 3}, {"Phone2", 1, 2, 3}, } Server Code: function getShops() for k, v in ipairs(shops) do return shops[k][4] end end addEvent("getshops", true) addEventHandler("getshops", getRootElement(), getShops) Client Code: local cost = triggerServerEvent("getshops", getRootElement()) dxDrawText("#ffffffCost: #6ad622"..cost.. " $" ,x/2+ 10, y/2+index*58+18.5, panelSize[1], 25*2.3, tocolor(66, 244, 220, 255), 0.8, font2, "left", "top", false, false, false, true)
  3. But this is the problem that the "getScreenFromWorldPosition", "getVehicleComponentPosition" client side and I can not write it to server pages because it issues a error.
  4. Hi! My problem is that on the client side the object is seen by only one person who has tried it out and I want everyone to see the object on the server. Client Side: local rx,ry,rz = getElementPosition(getElementData(localPlayer,"cage")) local cx,cy,cz = getVehicleComponentPosition(getElementData(localPlayer,"cage"),"static_p01") local x,y,z = rx + cx, ry + cy+3, 0.8 local a,b = getScreenFromWorldPosition(x,y,z) local magnet = createObject(1301, rx-0.6, ry-5, rz+4, 0, 0, 0) setObjectScale(magnet, 0.3) setElementCollisionsEnabled(magnet, false) moveObject(magnet, 1000*60*1, rx-0.6, ry-5, rz-50) setTimer(function() destroyElement(magnet) local magnet2 = createObject(1301, rx-0.6, ry-5, rz-50, 0, 0, 0) setObjectScale(magnet2, 0.3) setElementCollisionsEnabled(magnet2, false) moveObject(magnet2, 1000*60*1, rx-0.6, ry-5, rz+4) local crate = createObject(1224, rx-0.6, ry-5, rz-50.3, 0, 0, 0) moveObject(crate, 1000*60*1, rx-0.6, ry-5, rz+3.3) setElementCollisionsEnabled(crate, false) setTimer(function() usedMagnet = false end, 1000*60*1, 1) end, 1000*60*1, 1) In principle I should only use this server site: setElementVisibleTo
  5. It was not good, the error remained.
  6. And how could it be defined on a server side?
  7. Hi! Can not I solve this bug to fix it? Code: setTimer(function() if getElementData(thePlayer, "asd.asd") then outputChatBox("asd", thePlayer, 255, 255, 255, true) end end, 1000*3, 0)