I write to you small stuff looks littlebit like some shiiit, but this is maximum what we can get from GTA Engine (i think).
Code:
-- created by l0nger
local outlineForPlayers={}
local DEFAULT_DRAW_DISTANCE = 50
local DEFAULT_COLOR = {255, 200, 100, 125}
local DEFAULT_SPECULAR_POWER = 1.15
function createOutlineForPlayer(player)
if outlineForPlayers[player] then return false end
outlineForPlayers[player]={}
outlineForPlayers[player].shader=dxCreateShader("fx/outline.fx", 1, DEFAULT_DRAW_DISTANCE, true, "ped")
if not outlineForPlayers[player].shader then
-- we cant make shader, problem with memory?
return false
end
dxSetShaderValue(outlineForPlayers[player].shader, "sColorizePed", {DEFAULT_COLOR[1]/255, DEFAULT_COLOR[2]/255, DEFAULT_COLOR[3]/255, DEFAULT_COLOR[4]/255})
dxSetShaderValue(outlineForPlayers[player].shader, "sSpecularPower", DEFAULT_SPECULAR_POWER)
engineApplyShaderToWorldTexture(outlineForPlayers[player].shader, "*", player)
engineRemoveShaderToWorldTexture(outlineForPlayers[player].shader, "muzzle_texture*", player)
if getElementAlpha(player)==255 then
setElementAlpha(player, 254)
end
return true
end
function removeOutlineFromPlayer(player)
if not outlineForPlayers[player] then return false end
if not isElement(outlineForPlayers[player].shader) then return false end
engineRemoveShaderToWorldTexture(outlineForPlayers[player].shader, "*", player)
destroyElement(outlineForPlayers[player].shader)
outlineForPlayers[player] = nil
return true
end
-- and creating for local player
createOutlineForPlayer(localPlayer)
And code from outlife.fx
https://pastebin.com/r2rD9ss4
Regards and hf.
what? Try this code
local markercords={
{1945.20874, -1778.62756, 13.39060},
{1944.33765, -1773.98657, 13.39060},
{1944.09851, -1771.35437, 13.39060},
{1944.29260, -1767.30762, 13.38281}
}
addEventHandler("onResourceStart", resourceRoot, function()
for i, data in pairs(markercords) do
local marker=createMarker(data[1], data[2], data[3], "cylinder", 2, 255, 255, 0, 100)
end
end)