-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
Yes that mean that table is not exist you need make it and put clomn on it
-
look at meta which is server side and add it on it
-
Well you need trigger then client even showHide and that it
-
Well no here your function make it getPlayerWantedLevel setTimer setElementPosition
-
I think you need onPlayerCommand -- event fileCreate fileWrite fileClose
-
It dxscoreboard or your own?
-
You can create costum weapons and use shader createWeapon dxCreateShader dxCreateTexture dxSetShaderValue engineApplyShaderToWorldTexture
-
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
-
It client or server side?
-
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)
-
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
-
i had give you a ccode working perfectly
-
No that is client side
-
Remove the [] and try
-
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
-
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 )
-
toggleControl(_, "radar", false)
-
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