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

Wysłany: 2018-10-19, 15:16


czlowiekjaja







Wiek: 20
Na forum: 2991 dni
Posty: 76
Nick w MP: czlowiekjaja

Piwa: 324

Respekt: 50

Witam mam taki kod

(client)


marker = createMarker(70.47894, 1218.65283, 18.22036-0.50, "cylinder", 3.5, 255, 255, 0, 255)
setElementData(marker, "status", false)

function entermarker(plr)
    if source == marker then else return end
    if getElementType(plr) == "player" then else return end
    if plr == getLocalPlayer() then else return end
    if isElementWithinMarker(plr, marker) then else return end
    if getElementData(marker, "status", false) then
        addEventHandler("onClientRender", root, info)
    end
end
addEventHandler("onClientMarkerHit", root, entermarker)


i problem jest z getElementData poniewa? po wejsciu w marker nic sie nie dzieje a gdy elementdata nie ma to juz wszystko dziala poprawnie

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-19, 15:21


Qwertick

Coming soon...






Wiek: 23
Na forum: 3718 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2727

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Zobacz to, chocia? nie za bardzo ci? zrozumia?em czy o to chodzi..
marker = createMarker(70.47894, 1218.65283, 18.22036-0.50, "cylinder", 3.5, 255, 255, 0, 255)
setElementData(marker, "status", false)

function entermarker(plr)
    if source == marker then else return end
    if getElementType(plr) == "player" then else return end
    if plr == getLocalPlayer() then else return end
    if isElementWithinMarker(plr, marker) then else return end
    if not getElementData(marker, "status") then
        addEventHandler("onClientRender", root, info)
    end
end
addEventHandler("onClientMarkerHit", root, entermarker)


Podpis

Kontakt
Discord: Qwertick#1210

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-19, 15:22


czlowiekjaja







Wiek: 20
Na forum: 2991 dni
Posty: 76
Nick w MP: czlowiekjaja

Piwa: 324

Respekt: 50

dzia?a dzi?ki!

Postaw piwo autorowi tego posta
 

 
Tagi: element :: data :: marker
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