Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: markeru
1. Inni gracze mog± używać markeru jak to ukryć??
Witam chc? aby inni gracze nie mogli u?ywa? tego markeru tylko jedna osoba kt?ra rozpocznie prace. zrobi?em tak ale co? nie dzia?a. Oczywiscie oni tego markeru nie widz? ale jak wejda w to miejsce to i tak te funkcj? si? wykonuj? u osoby kt?ra rozpocz??a prace,



function pizza(gracz)
  if 
gracz ~= localPlayer then return end

local x
yrandomMarker()
 
marker2 createMarker(xyz"cylinder" ,
 
myBlip createBlipAttachedTo marker241 )
addEventHandler("onClientMarkerHit"marker2pieniadze)
addEventHandler("onClientMarkerHit"marker2pizza)
end

2. [<font color=3300FF>MTA</font>] Nie tworzy marke
Witam, nie tworzy mi markeru do budynku prawa jazdy, czy wszystko tu jest dobrze napisane? Jezeli tak to jaki mo?e by? pow?d?
////////////////////////////////////////////////
[Lua]
createBlip(1112.52, -1835.87, 16.60, 36,2,0,0,0,0,0,275)

local text=createElement("text")
setElementPosition(text,1112.52, -1835.87, 16.60+0.8)
setElementData(m, "text","Wej?cie Prawo jazdynLos Santos")

local text=createElement("text")
setElementPosition(text,-2026.88, -103.60, 1035.18+0.8)
setElementData(text,"name","Wyj?cie z prawa jazdy nLos Santos")
setElementInterior(text, 3)
setElementDimension(text, 1)

wejscie = createMarker (1112.52, -1835.87, 16.60+0.8, "arrow", 1.0, 0, 122, 255, 255)
setElementData(wejscie, 'typ', 'drzwi')

wyjscie2 = createMarker (-2026.88, -103.60, 1034.90+1, "arrow", 1, 0, 122, 255, 255)
setElementData(wyjscie2, 'typ', 'drzwi')
setElementInterior(wyjscie2, 3)
setElementDimension(wyjscie2, 1)

addEventHandler("onMarkerHit", wejscie, function(el, md)
if getElementType(el) ~= "player" then return end
if isPedInVehicle(el) then return end
setElementInterior(el, 3)
setElementDimension(el, 1)
setElementPosition(el, -2029.72, -106.90, 1035.17)
end)

addEventHandler("onMarkerHit", wyjscie2, function(el, md)
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementDimension(el, 0)
...
3. zmiana markeru
witam jak w tym kodzie zmieni? to, aby "podmieniony" marker byl podmieniony pod marker o nazwie "arrow", zamiast pod "cylinder"?

[lua]


MARKER_DRAW_DISTANCE = 3000
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 = exports['lrpg-dxGui']:dxGetFont('default') or 'default-bold'

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 "marker"
local dist = getDistanceBet...
4. Wychodzenie z markeru
Witam, mam pytanie
robie skrypt kt?ry robi bramy i jest marker gdy osoba w niego wejdzie sprawdza czy jest w bazie danych jest wszystko ok, tylko jest jeden problem jak zrobic aby po wyjsciu z markeru wykona?o si? moveobject. tylko zeby to nie by? timer.
kod:

local ow1 
createObject(5422945.70, -1535.4014.600090)
local wejscie1 createMarker(945.62,-1535.30,12.65"cylinder"32552552550)

function 
isPlayerInFaction(plr)
    
local sid=getElementData(plr,'player:sid')
    if 
not sid then return end

    local result
=exports['pystories-db']:dbGet('SELECT 1 FROM pystories_factions WHERE code=? AND sid=? LIMIT 1;'"SAMC"sid)
    if 
result[1then
        
return true
    
else
        return 
false
    end
end

addEventHandler
('onMarkerHit'wejscie1, function (plr)
    if 
isPlayerInFaction then
        moveObject 
(ow11000945.70, -1535.405.60)
5. ¦wiatło zamiast markeru
Witam mam pytanie czy da si? zamieni? marker na ?wiat?o takie co jest na nfs:sa
6. Aktywowanie markeru pojazdem
Witam! Tworz? prace dorywcz? i m?j problem polega na tym:

Wszystko dzia?a jak powinno lecz gdy doje?dzam do celu, marker sie nie aktywuje, na pieszo tak samo.


function cel(plr)
    
local kasa math.random(340415)
    
destroyElement(pojazd)
    
destroyElement(markercel)
    
destroyElement(blipcel)
    
outputChatBox("* Dostarczy?e? towar w wyznaczone miejsce! Otrzymujesz "..kasa.." PLN!"plr)
    
givePlayerMoney(kasa)
end
addEventHandler
("onMarkerHit"markercelcel)
7. dodawanie markeru do/na/pod pojazdu?
witam
tak jak w temacie, jak doda? marker 'corona' np do pojazdu Cabbie?
8. Nie tworzy Markeru
Witam, mam jeden problem nie tworzy mi si? marker (oczywi?cie element dat? mam nadan?, po stronie serwera). B??d wywala w eventHandlerze w 2 argumencie ( Expected element at argument 1, got nil )

function stworzMarker()
if 
getElementData(localPlayer"sejf") == true then
markersejf 
createMarker(20, -33.8"arrow"125500255)
end
end


function sejf(el)
if 
el ~= localPlayer then return end
guiSetVisible
(okno,true)
showCursor(true)
rnd math.random(1#kody)
setElementData(localPlayer"kod"kody[rnd])
outputChatBox("Kod: "..rnd.."")
outputChatBox("Oto panel sejfu. Musisz zgadn?? jeden z ci?g?w liczb, kt?ry jest obok na li?cie.")
outputChatBox("W przypadku podania z?ego kodu, nie martw si?. Masz niesko?czono?? pr?b dop?ki ci? nie zabij?.")
end
addEventHandler
("onClientMarkerHit"markersejfsejf)
9. Nie chce usun±ć markeru
Tak jak w temacie nie mog? usun?? markeru. Marker mam zrobiony po stronie clienta a usuwanie po stronie serwera. Oczywi?cie jest trigger. ?adnych DB3.

Server:

addEvent("destroy"true)
addEventHandler("destroy"getRootElement(), function()
destroyElement(markersejf)
end)


Trigger z clienta:

triggerServerEvent("destroy"getRootElement(), markersejf)
10. Tworzenie Markeru
Witam zrobilem skrypt na " Teleport poprzez marker " lech chcia?bym aby nie mo?na by?o wykona? to z u?yciem pojazdu


wejscie 
createMarker (2288.10840,1015.90839,14.5-1"arrow"12552550)
wyjscie createMarker (1177.22437,-911.70465,150.5-1"arrow"12552550)
setElementDimension(wyjscie2)
setElementInterior(wyjscie1)


addEventHandler("onMarkerHit"wyjscie, function(elmd)
    if 
isPedInVehicle(elthen return end
    setElementDimension
(el0)
    
setElementInterior(el0)
    
setElementPosition(el2288.13159,1011.25464,10.8203)
end)

addEventHandler("onMarkerHit"wejscie, function(elmd)
    if 
isPedInVehicle(elthen return end
    setElementDimension
(el2)
    
setElementInterior(el1)
    
setElementPosition(el1179.95728,-911.86700,148.2)
end)


Za pomoc leci piwko i respekt !