Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local markertypes = {}
- local state = {}
- local posz = {}
- local kreis = dxCreateTexture("files/images/kreis.png")
- markerTextures = {}
- addEventHandler("onClientResourceStart", resourceRoot, function()
- triggerServerEvent("givePlayerClientMarkers", localPlayer, localPlayer)
- end)
- addEvent("ReciveMarkerInformations", true)
- addEventHandler("ReciveMarkerInformations", root, function(tab)
- for i, t in pairs(tab) do
- state[i] = "up" posz[i] = 0 end
- markertypes = tab
- end)
- local textureIDS = {
- ["no"] = "files/images/marker/no.png",
- ["clown"] = "files/images/marker/clown.png",
- ["job"] = "files/images/marker/job.png",
- ["jobs"] = "files/images/marker/jobs.png",
- ["driving"] = "files/images/marker/driving.png",
- }
- for i, elem in pairs(textureIDS) do
- --outputChatBox(i..","..elem)
- markerTextures[i] = dxCreateTexture(elem)
- end
- addEventHandler("onClientRender", root, function()
- for i, elem in pairs(markertypes) do
- --if elem.typ == "driving" then outputChatBox("Drive0") end
- --outputChatBox(i)
- if tonumber(getElementData(localPlayer, "markers"..i)) == 0 or not getElementData(localPlayer, "markers"..i) then
- elem.ex = elem.x-0.5
- if state[i] == "up" then posz[i] = posz[i]+0.0125
- if posz[i] >= 0.5 then state[i] = "down" end
- else
- posz[i] = posz[i]-0.0125
- if posz[i] <= 0 then state[i] = "up" end
- end
- local z = getGroundPosition(elem.x, elem.y, elem.z)+0.05
- --dxDrawMaterialLine3D(-85.853141784668, -23.399610519409, 3.1171875+4, -85.853141784668, -23.399610519409, 3.1171875, 0, self.spos, self.w, self.h-self.ground-self.top, self.supertarget,4, _, -112.75427246094, 150.96311950684, 81.067733764648)
- dxDrawMaterialLine3D (elem.ex,elem.y,z,elem.ex+1, elem.y, z, kreis, 1, tocolor(255,255,255,155), elem.ex+1,elem.y,z+1)
- dxDrawMaterialLine3D (elem.ex+0.5,elem.y,z+1.5+posz[i],elem.ex+0.5, elem.y, z+0.5+posz[i], markerTextures[elem.typ], 1, tocolor(255,255,255,255))
- --outputChatBox(elem.typ)
- --outputChatBox(elem.x..","..elem.y..","..z)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement