Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-06-20, 13:04


Daybreak







Wiek: 27
Na forum: 3692 dni
Posty: 30

Piwa: 2

Respekt: 50

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

Kod:

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


markers_render

Kod:

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"
animTime = getTickCount()
end
else
local progress = (getTickCount() - animTime) / 1500
position = math.floor(interpolateBetween(200, 0, 0, 0, 0, 0, progress, "OutQuad"))
if(progress > 1) then
anim_type = "back"
animTime = getTickCount()
end
end

dxDrawMaterialLine3D(x, y, z+1+1+(position/1000), x, y, z+1+(position/1000), arrow, 1, tocolor(r, g, b, 200))

dxDrawMaterialLine3D(x+size, y+size, z+0.04, x-size, y-size, z+0.04, light, size*3, tocolor(r, g, b, 155), x, y, z)
end
end
end
end
)


markers_s

Kod:

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


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-20, 13:16


_jvneczek







Wiek: 22
Na forum: 4325 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

odpalasz je i po prostu w skrypcie bierzesz
exports.custom_markers:createCustomMarker(xyz-1"cylinder"sizergb)


Podpis

Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-20, 13:56


Daybreak







Wiek: 27
Na forum: 3692 dni
Posty: 30

Piwa: 2

Respekt: 50

PolskiZiomal, a mam da? to z-1?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-20, 14:16


Atroth







Wiek: 23
Na forum: 3677 dni
Posty: 1089
Nick w MP: Atroth

Piwa: 4808

Respekt: 540
Respekt: 540

Daybreak, x, y, z to jest pozycja gdzie ma by? marker.

Podpis

Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-20, 14:23


Daybreak







Wiek: 27
Na forum: 3692 dni
Posty: 30

Piwa: 2

Respekt: 50

Atroth, to mam kordy da? i ten napis cylinder w ka?dym z tych kod?w?

[ Dodano: 2018-06-20, 14:30 ]
mogli by?cie wyt?umaczy? ja?niej jak to zrobi?? lub jaki? przyk?ad da?

[ Dodano: 2018-06-20, 14:30 ]
mogli by?cie wyt?umaczy? ja?niej jak to zrobi?? lub jaki? przyk?ad da?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-20, 15:58


_jvneczek







Wiek: 22
Na forum: 4325 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

Daybreak, pobierz jak?? paczke z gtao i tam bedziesz mial markery i bedziesz juz wiedzial co i jak.

Podpis

Support Team: 04.10.2020 - 01.09.2020
Test Moderator: 03.05.2021 - 01.09.2021
Moderator: 01.09.2021 - 23.10.2021

Postaw piwo autorowi tego posta
 

 
Tagi: custom :: marker :: jak :: ustawić :: działały?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku