Jump to content

BlockFighter

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by BlockFighter

  1. BlockFighter

    Client Bug

    Hi! I was facing a problem that the server was working perfectly so far as soon as I reinstalled it, my machine was not working. For my friends, the server works perfectly. Downloaded resources don’t exactly want to work for me. I have already reinstalled the MTA and GTA about 20x.
  2. The 'cost' variable only points to 0 in dxDraw.
  3. 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)
  4. 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.
  5. 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
  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)
×
×
  • Create New...