Witam mam skrypt na Custom Markery by TheTroll lecz nie wiem jak je w??czy?... m?g? by kto? wyt?umaczy? jak je aktywowa? i ustawi?? skrypt na nie wygl?da tak
markers_c
[code]function createCustomMarker(x, y, z, type, size, r, g, b)
if x and y and z and type and size and r and g and b then
local marker = createMarker(x, y, z, type, size, r, g, b, 0)
setElementData(marker, "custom_marker", true)
return marker
end
end[/code]
markers_render
[code]local light = dxCreateTexture("files/light.png", "argb")
local arrow = dxCreateTexture("img/arrow.png", "argb")
local anim_type = "foward"
local distance = 50
local animTime = 0
addEventHandler("onClientPreRender", root,
function()
for i, v in ipairs(getElementsByType("marker")) do
if getElementData(v, "custom_marker") then
local x, y, z = getElementPosition(v)
local x2, y2, z2 = getElementPosition(localPlayer)
local r, g, b, a = getMarkerColor(v)
local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2)
if (distanceBetweenPoints < distance) then
local size = getMarkerSize(v)
if anim_type == "back" then
local progress = (getTickCount() - animTime) / 1500
position = math.floor(interpolateBetween(0, 0, 0, 200, 0, 0, progress, "InQuad"))
if(progress > 1) then
anim_type = "foward"
... |