Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. Dimos7

    Error In Mysql

    Yes that mean that table is not exist you need make it and put clomn on it
  2. Dimos7

    Trade

    i don't see where is the addCommandHandler here
  3. Well you need trigger then client even showHide and that it
  4. Well no here your function make it getPlayerWantedLevel setTimer setElementPosition
  5. Dimos7

    BindKey

    aclGetGroup isObjectInACLGroup getPlayerAccount getAccountName setElementData getElementData triggerClientEvent bindKey
  6. I think you need onPlayerCommand -- event fileCreate fileWrite fileClose
  7. Dimos7

    Scoreboard

    It dxscoreboard or your own?
  8. You can create costum weapons and use shader createWeapon dxCreateShader dxCreateTexture dxSetShaderValue engineApplyShaderToWorldTexture
  9. Depents what you want to do want enter can apear window and buy etc anyway createVehicle guiCreateWindow guiCreateLabel guiCreateButton getPlayerMoney takePlayerMoney setElementData You need client and server side as said there are many was to make it that is some function you need
  10. local warpTime = 5000 -- 5 seconds addCommandHandler( "garage", function( thePlayer ) outputChatBox( "You are now in Garage", player, 0, 255, 0 ) local warpTimer = setTimer(function() setElementPosition(thePlayer, - 1995.29871, 434. 22961,35.17188) end, warpTime, 1)
  11. Dimos7

    create Ped

    What are you try to do?
  12. nvm i confused here you go ID = {} exports["scoreboard"]:scoreboardAddColumn("ID", root, 20, "ID", 1) ------------------------- [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 1, getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "ID", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 1, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "ID", i) break end end end end) ------------------------- [ Functions ] ----------------------- function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" then return getElementData(player, "ID") end return false end -- function getPlayerFromID(id) if id and tonumber(id) then return ID[tonumber(id)] end return false end
  13. i had give you a ccode working perfectly
  14. local names = { -- Node, street, district { [1703957, 1703958] , name = "Interstate 89", district = "Vice Point" }, } for k, node in ipairs( names ) do for _, route in ipairs( node ) do if #route == 1 then local value = getNodeByID( vehicleNodes, route[1] ) if value then if not value.streetname then value.streetname = node.name elseif value.streetname ~= node.name then value.streetname = value.streetname .. "/" .. node.name end end else for i = 1, #route - 1 do local path = calculatePathByNodeIDs( math.abs(route[i]), math.abs(route[i+1]) ) for key, value in ipairs(path) do if value.id == -route[i] or value.id == -route[i+1] then elseif not value.streetname then value.streetname = node.name elseif value.streetname ~= node.name then value.streetname = value.streetname .. "/" .. node.name end end end end end end local cacheX, cacheY, cacheZ = 0, 0, 0 addEventHandler("onClientRender", getRootElement(), function() local x, y, z = getElementPosition(getLocalPlayer()) if cacheX ~= x or cacheY ~= y or cacheZ ~= z then local node = findNodeClosestToPoint(vehicleNodes, x, y, z) setElementData(getLocalPlayer(), "speedo:street", node.streetname) cacheX = x cacheY = y cacheZ = z end end )  local streetname = getElementData(getLocalPlayer(), "speedo:street" ) if streetname and getVehicleType(vehicle) ~= "Boat" and getVehicleType(vehicle) ~= "Helicopter" and getVehicleType(vehicle) ~= "Plane" then local width = dxGetTextWidth( streetname ) local x = width < 200 and ( x - 110 - width / 2 ) or ( x - 10 - width ) dxDrawRectangle( x - 8, y - 296, width + 17, 24, tocolor( 5, 5, 5, 220 ) ) dxDrawText( streetname, x, y - 292 ) end -- district names local streetzone = getElementData(getLocalPlayer(), "speedo:zone" ) if streetzone and getVehicleType(vehicle) ~= "Boat" and getVehicleType(vehicle) ~= "Helicopter" and getVehicleType(vehicle) ~= "Plane" then local width = dxGetTextWidth( streetzone ) local x = width < 200 and ( x - 110 - width / 2 ) or ( x - 10 - width )  dxDrawRectangle( x - 8, y - 76-5, width + 17, 24, tocolor( 5, 5, 5, 220 ) ) dxDrawText( streetzone, x, y - 72-5 ) end
  15. local o = createObject( 2121, 1418.1678466797,-1595.0837402344,13.366353988647 ) shader1 = dxCreateShader("texReplace.fx", 0, 0 , false, "object") red = dxCreateTexture("red.png") dxSetShaderValue( shader1, "gTexture", red ) engineApplyShaderToWorldTexture( shader1, "gTexture", o ) local o1 = createObject( 2121, 1411.8753662109,-1591.5054931641,13.360206604004 ) shader2 = dxCreateShader("texReplace.fx", 0, ,0, false, "object") blue = dxCreateTexture("blue.png") dxSetShaderValue( shader2, "gTexture",blue) engineApplyShaderToWorldTexture( shader2, "gTexture", o1 )
  16. toggleControl(_, "radar", false)
  17. local sw, sh =guiGetScreenSize() local sx, sy = sw/1920, sh/1080 dxDrawRectangle(sx*0.008,sy*0.957,length + sx*55,sy*0.030, tocolor ( 0, 266, 0, 250 ) ) That wasn't my code
×
×
  • Create New...