Siemano, potrafi ktoś naprawić brak niektórych Markerów na paczce jp? Mianowicie nie odpowiedzialnych, za rozpoczęcie służby we frakcjach (wszystkich) i na mechu Dohery.
Pobra?em ostatnio paczk? DemusMTA, mam pewien problem jest na niej tylko komisariat w LV, o interiorze LSPD. Chcia?bym zrobi? w San Fierro r?wnie? komend?, lecz o dimensionie 1, lecz w dimensionie 1 s? markery z dimensiona 0. Tak jakby ich nie wida? ale da si? rozpoczyna? s?u?be itp.
Witam, mam problem taki i?, skrypt nie czyta eldat na markerach, dla testu zrobi?em if not data then i faktycznie wtedy ikona mi wyskoczy?a
robie markery dlatego te? przyda?by mi si? dla wygl?du obrazki nad nimi
Stawiam piwko za pomoc
W taki spos?b nadaje eldate po stronie clienta
[code] setElementData(marker, "marker:custom", "jedzenie")[/code]
a to kod marker?w
[code]addEventHandler("onClientRender", root,
function()
for i, v in ipairs(getElementsByType("marker")) do
local x, y, z = getElementPosition(v)
local x2, y2, z2 = getElementPosition(localPlayer)
setElementAlpha(v, 0)
local data = getElementData(v, "marker:costum")
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) / 3500
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) / 3500
position = math.floor(interpolateBetween(200, 0, 0, 0, 0, 0, progress, "OutQuad"))
if(progress > 1) then
anim_type = "back"
animTime = getTickCount()
...
witam.
Mam mape na innym dimie, jednak w tym miejscu gdzie jest marker na innym dimie gui sie wy?wietla tak jakbym wszed? w niego. Mo?na co? temu zaradzic?
1.Witam przychodz? z pytaniem jakiej funkcji potrzebuje by marker co x metr?w gdy pojazd si? porusza si? tworzy?. Planuj? napisa? prac? i g?owie si? jak zrobi? ?e co x metr?w gdy pojazd si? porusza w jakim? obr?bie tworzy si? owy marker
2. chcia?bym zrobi? zmienne zarobki co 4h jak polecacie zrobi??
Witam mam skrypt z eclipserpg na markery lecz jest jeden problem gdy np dam marker typu "arrow" to s? dwa markery ten arrow i podmianka jak to zrobic by byla tylko podmianka markeru na "cylindrze" a na reszcie byly normalne
[lua]
MARKER_DRAW_DISTANCE = 9999
MARKER_FADE_DISTANCE = MARKER_DRAW_DISTANCE-10
MARKER_REFRESH_TIMEOUT = 500 -- czas w ms co ile wyszukuje markery w poblizu
tick_rotation=getTickCount()
local markers = {}
local textures = {}
local iconSize = Vector2(0.8, 0.8)
function findRotation(from_x, from_y, to_x, to_y)
local result = -math.deg(math.atan2(to_x - from_x, to_y - from_y))
return result < 0 and result + 360 or result
end
local thisTick = getTickCount()
local font = dxCreateFont('f.ttf',15)
function renderCustomMarkers()
local cx, cy, cz = getCameraMatrix()
local rx, ry, rz = getElementRotation(getCamera())
local posPlayerX, posPlayerY, posPlayerZ=getElementPosition(localPlayer)
local pX,pY,pZ=getElementRotation(localPlayer)
--local tick = math.abs(getTickCount() % 2500 - 2500/2) / 2500/2
local tick = interpolateBetween(0,0,0,0.3,0,0, (getTickCount()-thisTick)/2500, "SineCurve")
for i, marker in ipairs(markers) do
if isElement(marker) then
local x, y, z = getElementPosition(marker)
local radius = getMarkerSize(marker) or 3
local color = {getMarkerColor(marker)} or {255, 255, 255, 255}
local icon = getElementData(marker, "icon") or &qu...
Hejka, jako i? skrypt nie zostanie jednak u?yty na serwerze, udost?pniam wam markery 3D z NitroRPG.
Markery posiadaj? mo?liwo?? dodania ikonek (przyk?ad jest w skrypcie).
Mianowicie, wgrywacie grafik? do folderu "img" i ?adujecie j? za pomoc? mety, p??niej wpisujecie do tablicy.
Ikonk? nadajmy poprzez elementdate, przyk?ad: setElementData(marker, "marker:icon", "NazwaIkony")
Wygl?d marker?w
Autor: TheNoobisty
Link
Ukryta wiadomość / Hidden message(aby ją zobaczyć musisz postawić użytkownikowi)
Wiadomość została ukryta, aby ją przeczytać należy się zalogować.
Siema! Napotka?em ostatnio taki problem(?). Mianowicie - stworzy?em sobie gui bankomatu, i wszystko fajniutko pi?kniutko, ale gui si? odpala w ka?dym markerze, niezale?nie w jakim skrypcie jest. Jakie? pomys?y, bo moje si? sko?cz?y?
--[[BANKOMATY LOS SANTOS
{2194.30, -1971.70, 13.78-0.35, -0.00, 0.00, 177.89}, -- Praca Smieciarki.
{2110.01, -2100.33, 13.55-0.35, -0.00, 0.00, 359.49}, -- Salon obok ?mieciarek.
{872.86, -1203.87, 16.98-0.35, -0.00, 0.00, 0.30}, -- Salon w Vinewood obok LSPD na PRL.
{2133.30, -1151.32, 24.08-0.35, -0.00, 0.00, 179.41}, -- Salon Motorniczy obok Gangu Blood na PRL. (( Jak jeszcze istnieje. ))
{661.36, -576.13, 16.34-0.35, -0.00, 0.00, 269.16}, -- Stacja Benzynowa Dillimore | Red County.
--BANKOMATY LOS SANTOS--]]
Witam, chcia?bym zapyta?, jak? funkcj? mo?na wy??czy? dzia?anie markera powy?ej nim, poniewa? stawiam marker, np. w kordach 0,0,0, to w kordach 0,0,10 on nadal dzia?a, co zrobi?, aby tak nie by?o?
Cze??.Zrobi?em tabele kt?r? da?em pod markery i u?y?em jeszcze math.random.Tylko problem jest taki ?e mi si? respi po kilka w r??nych miejscach.Nawet si? raz respi 10 w jednym miejscu
Kod dotycz?cy tabeli:
local sw,sh = guiGetScreenSize()
local zoom = 1920/sw
local dx = exports.dxLibary
local PJ = {}
local tbl = {}
local timer = false
addCommandHandler("t", function()
timer = setTimer(function()
local x,y,z = getElementPosition(localPlayer)
table.insert(tbl, {x, y, z})
outputChatBox("Dodano!")
end, 2500, 0)
end)
addCommandHandler("s", function()
for i,v in pairs(tbl) do
outputChatBox("{"..v[1]..", "..v[2]..", "..v[3].."},")
end
if(timer and isTimer(timer))then
killTimer(timer)
timer = false
end
end)
-- usefull function created by Asper
function isMouseInPosition(x, y, w, h)
if not isCursorShowing() then return end
local mouse = {getCursorPosition()}
local myX, myY = (mouse[1] * sw), (mouse[2] * sh)
if (myX >= x and myX <= (x + w)) and (myY >= y and myY <= (y + h)) then
return true
end
return false
end
local click = false
function onClick(x, y, w, h, called)
if(isMouseInPosition(x, y, w, h) and not click and getKeyState("mouse1"))then
click = true...
Witam mam pytanie chcia?em podmieni? zwyk?e:
local wejscie=createMarker(-2413.41,-601.94,132.56+0.60, "arrow", 1, 255, 0, 0, 50)
na marker z ikonk? tylko nw jak bo mam takie cos:
function createCustomMarker(x, y, z, r, g, b, a, icon, size)
id = findFreeValue(customMarkers)
customMarkers[id] = {}
customMarkers[id]["marker"] = exports["pd-dynamic-light"]:createPointLight(x, y, z, r / 255, g / 255, b / 255, a / 255, size)
if not icon then icon = "marker" end
customMarkers[id]["data"] = {x=x, y=y, z=z, r=r, g=g, b=b, a=a, icon=icon, size=size}
customMarkers[id]["normal"] = createMarker(x, y, z, "cylinder", size, 0, 0, 0, 0)
setElementData(customMarkers[id]["normal"], "marker:id", id)
return customMarkers[id]["normal"], id
end
- w skrypcie z merkerami, oczywscie mam osobno i chcia?em zrb to pod ikonk?. czyli co mam podmieni? exports ? cos cos czy jak? ten local….
Witam mam taki problem i? gdy wgrywam markery na serwer to wszystko dziala tylko ze w kazdym skrypcie bym musial ustawiac ten sam kolor markera jaki chce.Jak zrobi? zeby kolor strzalki kt?ra jest zrobiona graficznie si? nie zmienia?
[quote]local strzalka = dxCreateTexture("strzalka.png")
local marker = dxCreateTexture("marker.png")
local tick = getTickCount()
function getDistance(element)
local x1,y1,z1 = getElementPosition(element)
local x2,y2,z2 = getElementPosition(localPlayer)
local distance = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2)
if tonumber(distance) then
return tonumber(distance)
end
return false
end
function dxDrawTextElement(element, text)
if not getElementData(localPlayer, "user:logged") then return end
if isPlayerMapVisible() then return end
if not getElementData(localPlayer, "hud:enabled") then return end
local x, y, z = getElementPosition(element)
z = (z+1.3)-math.sin(getTickCount()/500)*0.33
local distance = getDistance(element)
local sx,sy = getScreenFromWorldPosition(x, y, z)
local rootx,rooty,rootz = getCameraMatrix()
if x ~= 0 and y ~= 0 and z ~= 0 and sx and sy and distance < 10 and isLineOfSightClear(rootx,rooty,rootz,x,y,z,false,false,false) then
exports["buttons"]:createCustomText(text, sx, sy, sx, sy, tocolor(255, 255, 255, 255), 1, font3, "center", "center")
end
end
Witam szukam ju? troszk? czasu, oczywi?cie dopiero zaczynam przygod? z LUA, i nie znam odpowiedniej funkcji od wy??czenia Markera gracza na hud, tak aby nikt nie widzia? gdzie kto jest.
Cze?? ot?? mam GM na serwerze YouNiceLife i s? tam markery ( te k??ko na ziemi i strza?ka xDD ) i nie wiem jak je zrobic zeby dzia?a?y skrypty s? na to tylko nie chc? dzia?a?.
Przyznam szczerze ?e markery bardzo mi si? spodoba?y tylko mam pewien problem.
Nie wiem jak w gotowym kodzie podmieni? normalne markery, na te takie paradajsowe.
Podaje ca?y kod, w kt?rym chcia?bym podmieni? markery
[lua]
local m1 = createMarker(-1754.20, 962.35, 24.88-.9, "cylinder", 3.0, 0, 186, 255)
local t = createElement('text')
setElementPosition(t,-1754.20, 962.35, 24.88)
setElementData(t,"name","Rozpocz?cie pracy autobus?w")
local vehs = {}
local code = "Autobusy"
local zone = createColCuboid(-1542.65320, 599.93549, 6.18316, 7.600830078125, 42.438110351563, 7.0280956268311)
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "vehicle_job_owner") then
outputChatBox("praca w trakcie poprawek", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
if getElementData(el,"player:reputation") < 200 then outputChatBox("Aby rozpocz?? t? prac? potrzebujesz minimum 200 RP!",el) return end
if getElementData(el,"player:job") then return end
if #getElementsWithinColShape(zone,"...
Witam mam problem z markerami odno?nie chcia?bym by dla L i H by?y ustawione Ringi a dla A B C checkpoint [code]function finishLicense(value)
if isElement(licenseMarker) and licenseMarker then
destroyElement(licenseMarker)
licenseMarker=nil
end
if isElement(licenseBlip) and licenseBlip then
destroyElement(licenseBlip)
licenseBlip=nil
end
if value == true then
licenseCategory=nil
licenseVehicle=nil
licenseMarker=nil
licenseTarget=nil
licenseBlip=nil
end
end
addEvent("license:finish",true)
addEventHandler("license:finish", resourceRoot, finishLicense)
function showMarker()
local pos=categoryPositions[licenseCategory][licenseTarget]
if licenseCategory ~= "L, H" then
licenseMarker=createMarker(pos[1], pos[2], pos[3], "ring", 3, 0, 0, 255, 155)
else
licenseMarker=createMarker(pos[1], pos[2], pos[3], "checkpoint", 2, 43, 154, 211, 255)
end
licenseBlip=createBlip(pos[1], pos[2], pos[3], 0, 1, 255, 0, 0)
if categoryPositions[licenseCategory][licenseTarget+1] then
e=categoryPositions[licenseCategory][licenseTarget+1]
setMarkerTarget(licenseMarker, e[1], e[2], e[3])
end
addEventHandler("onClientMarkerHit", licenseMarker, function(el,md)
if not md or el~=localPlayer then return end
if not getPedOccupiedVehicle(el) then return end
if licenseTarget < #categoryPositions[licenseCategory] then
local sound=playSound(":ogrpg-misc/misc...
Witam chcia?bym podmieni? markery z gta v do gta sa aczkolwiek nie wiem jak.. robie wszystko co tylko sie da i nic... si? nie podmienia... Chcialbym cos takiego jak na tym filmie .. Z paradise rpg mia?y takie markery https://www.youtube.com/watch?v=JRa-UYARlrI
Chcia?bym si? zapyta? jak zrobi? marker "arrow" ruchomy. Ju? t?umacz? o co chodzi.
Chodzi mi o to, ?e jak postawie marker "arrow" np do urz?du lub przebieralni to, ?eby ten marker tak powoli unosi? si? w g?r? i w d??. Je?eli jest taka mo?liwo?? prosz? o podes?anie funkcji do tego, a odwdzi?cz? si? Zimnym
Witam mam z koleg? ma?y problem z kt?rym m?czymy sie pare godzin,
Chodzi o to ?e Jak 2 osoby pracuj? i 1 Osoba wejdzie w Marker to Wszystkim sie tak dzieje
[lua]
addEventHandler("onClientMarkerHit", Rozpocznijj, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
for i,v in pairs(auta) do
--if not getElementData(PlayerSource, "la"..data.."") then outputChatBox("#919191[#0053FFInformacja#919191] MIX JEST GLUPI",255,255,255,true) return end
outputChatBox("#0000ff==========================================",255,255,255,true)
outputChatBox("#919191[#0053FFInformacja#919191] Udaj sie do gara?u numer: 1",255,255,255,true)
outputChatBox("#0000ff==========================================",255,255,255,true)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
local auto...
Witam, to znowu ja xD
Dzisiaj chcia?bym prosi? o pomoc bo mam ju? po?ow? gotowej pracy ale kolega podes?a? mi pomys? ?eby zrobi? aktualne markery (niebieskie) aby nie dawa?y pieni?dzy, ale zrobi? jeszcze markery bia?e kt?re daje pieni?dze ale freezuj? pojazd na jakies 4 sekundy i po 4 sekundach od-frezzuje pojazd i jedzie dalej. Punkty koloru niebieskie maja prowadzi? do przystank?w kt?re b?d? koloru bia?ego i tak jak pisa?em wy?ej freezowa? pojazd. Prosz? o pomoc Oczywi?cie jak zawsze za pomoc daje
function animacja ()
if wez then
setPedAnimation ( localPlayer, "CARRY", "crry_prtial", 1,true ) local x, y, z = getElementPosition ( localPlayer ) local theObject = createObject ( 1220, x , y, z, 0, 0, 0 ) attachElements ( theObject, localPlayer, 0, 0.8, 0.6 ) end
end
addEventHandler("onClientMarkerHit", root, animacja)
Jest to paczka ogrpg. Chce zrobi? tak aby tylko osoby kt?re s? na sluzbie SAMA mog?y wej?? do recepcji.
Ostatnio sobie testowa?em teleportacje poprzez markery i wyskakuje mi kilka b??d?w takich jak ten:
SCRIPT ERROR: [skrypty_glowne]/frakcja-samc/s_interior.lua:56: 'end' expected (to close 'function' at line 52) near 'else'
Oto kawa?ek kodu:
addEventHandler("onMarkerHit", marker, function(el,md) -- linia 52
if getElementData(source,'player:duty') and getElementData(source,'player:duty')=='SAMA' then
setElementPosition(el, 1508.09, -1792.10, 9847.85)
return
end
else
outputChatBox("*Nie pracujesz w SAMA albo nie jeste? na s?u?bie!*",source)
return
end
end)
Jak by mi m?g? kto? pom?c, z g?ry dzi?kuje za pomoc.
addEventHandler("onMarkerHit", wejscie, function(el,md)
if getElementType(el) == "player" then if isPedInVehicle(el) then return end
setElementInterior(el, 0) setElementPosition(el, 2899.5, 2891.3999023438, 542.59997558594) end
end)
addEventHandler("onMarkerHit", wyjscie, function(el,md)
if getElementType(el) == "player" then if isPedInVehicle(el) then return end
setElementInterior(el, 0) setElementPosition(el, 2590.20874 2790.89771 10.82031) end
end)
To marker si? mi nie pojawia i niewiem co zrobi? najlepiej to zrobi? screena.
function removePreviousVehicles(plr)
for i,v in ipairs(getElementsByType("vehicle", resourceRoot)) do
local sby = getElementData(v, "zrespilGracz")
if sby and sby == plr and getPedOccupiedVehicle(plr) ~= v then
destroyElement(v)
end
end
end
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("praca w trakcie poprawek", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
local x,y,z = getElementPosition(el)
local bus = createVehicle(472,-1471.85,695.17,1.39,359.5,360.0,358.6)
function removePreviousVehicles(plr)
for i,v in ipairs(getElementsByType("vehicle", resourceRoot)) do
local sby = getElementData(v, "zrespilGracz")
if sby and sby == plr and getPedOccupiedVehicle(plr) ~= v then
destroyElement(v)
end
end
end
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("praca w trakcie poprawek", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
local x,y,z = getElementPosition(el)
local bus = createVehicle(437, x,y,z,0.0, 360.0, 269.9)
addEvent("STOPJobBus", true)
addEventHandler("STOPJobBus", resourceRoot, function()
local pojazd = getPedOccupiedVehicle(localPlayer)
if pojazd then
destroyElement(pojazd)
end
end)
Witam, jak dodac to tego kodu, ?e jak kto? jest w pracy to ci?gle beda sie mu pojawiac markery, a jak wejdzie w specjalny marker to juz nie beda mu sie pojawiac . TEN KOD
m = createMarker (-1845,112.6728515625,14.1171875,"cylinder", 1.2, 0,255,0)
function marker (source) pojazd = createVehicle(574,-1845,120.6728515625,15.1171875,0,0,0) setVehiclePlateText(pojazd,"sweeper") warpPedIntoVehicle(source, pojazd) end
addEventHandler("onMarkerHit", m, marker)
a drugie pytanie, to jak zrobic ze jak wejdzie w marker zaczynaj?cy prace to bed? pojawiac sie mu markery?