addEventHandler("onMarkerHit", resourceRoot, function(element, md)
if isPedInVehicle(element) then return end
if not md then return end
local p_name, p_cost, p_level, p_owner_org = getElementData(source, "place_name"), getElementData(source, "place_cost"), getElementData(source, "place_level"), getElementData(source, "place_owner_org")
outputDebugString(p_name.." "..p_cost.." "..p_level.." "..p_owner_org)
end)
o kurka, w sumie to zapomnia?em ?e tak mog? zrobi?, bo to oddzielny resource..
[ Dodano: 2016-05-21, 12:14 ]
if not md then return end
do czego ma s?u?y? tu matchingDimension, bo z tym to nie trybi.
[ Dodano: 2016-05-21, 12:16 ]
znaczy, w sumie rozumiem "True if the element is in the same dimension as the marker he hit", ale b?d?c w tym samym dim zwraca end, mo?e wcze?niej trzeba deklarn?? ?e theMarker ma by? w dim 0
[ Dodano: 2016-05-21, 12:17 ]
a nie bo nie zadeklarowane jest xd
[ Dodano: 2016-05-21, 12:18 ]
do zamkni?cia
[ Dodano: 2016-05-21, 12:19 ]
albo i nie, stop, bo zawsze pobiera si? ten marker kt?ry tworzy si? ostatni, nie wiem dlaczego
[ Dodano: 2016-05-21, 12:20 ]
albo nie Zn?w do zamkni?cia hah
[ Dodano: 2016-05-21, 12:22 ]
nie wiem co si? dzi? ze mn? dzieje, ale za szybko stwierdzam sytuacj?.
addEventHandler("onMarkerHit", resourceRoot, function(element, hitElement)
if isPedInVehicle(element) then return end
local p_name, p_cost, p_level, p_owner_org = getElementData(hitElement, "place_name"), getElementData(hitElement, "place_cost"), getElementData(hitElement, "place_level"), getElementData(hitElement, "place_owner_org")
outputDebugString(p_name.." "..p_cost.." "..p_level.." "..p_owner_org)
end)
wysypuje pe?no b??d?w
[ Dodano: 2016-05-21, 12:23 ]
kurde, bo to hit element to ten co uderzy? a nie to w co si? uderzy?o, to jaki? pomys??
matchingDimension ma na celu sprawdzenie czy marker i gracz s? w tym samym wirtualnym ?wiecie.
Pierwszym argumentem w handlerze eventu onMarkerHit jest ELEMENT, kt?ry do markeru wszed?. Mo?e to by? ped, gracz, pojazd.
Drugim argumentem jest matchingDimension.
W tym evencie, source to marker, w kt?ry wszed? element.
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