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: iselementwithinmarker
1. if isElementWithinMarker
siema, mam problem na db3 wywala mi taki b??d: https://i.imgur.com/BBLWYEz.png
o to kod:

local markers 
= {
{
2070.97+2, -1768.4213.56-1, -900}, 
{
1552.98, -1720.66-213.55-11800}, 
{
492.58, -1756.82-214.14-1180, -90
}

for 
i,v in ipairs(markers) do
local m createMarker(v[1], v[2], v[3], "cylinder"0.525500125)
end


function food(thePlayermatchingDimension)
    if 
isElementWithinMarker(thePlayermthen  
       local kasa 
getPlayerMoney(thePlayer)                               
          if (
kasa 19.999then 
           takePlayerMoney
(thePlayer20)
           
setElementHealth(thePlayergetElementHealth(thePlayer) + 80)
    else
       
outputChatBox("* Nie sta? ci? na jedzenie!"thePlayer25500true)
        
end
    end
end
addCommandHandler
("food"food)


za pomoc :piwo: :piwo: :piwo:
2. isElementWithinMarker
B??d DB3 to z?y argument w tej linijce:

if isElementWithinMarker(PlayerMarker[1]) then


function  bind()
if 
isElementWithinMarker(PlayerMarker[1]) then
    triggerServerEvent 
("tp1"PlayerPlayer)
end
end
bindKey
("l","down"bind)
3. isElementWithinMarker
Witam ponownie, spotykam sie zn?w z kolejnym b??dem u?ywaj?c funkcji isElementWithinMarker.
[b]C-SIDE[/b]
[lua]
Marker = createMarker( 1871.1986083984, -1857.5452880859, 13.663543701172-0.9, 'cylinder', 2.0, 255, 0, 0, 150 )-- marker
function changeCarLightsColor( thePlayer )
outputChatBox ( "Aby zamontowa? swiat?a musisz u?y? jednej z poni?szych komend." )
outputChatBox ( "/swiatlared - Czerwone ?wiat?a", source )
outputChatBox ( "/swiatlaorange - Pomaranczowe ?wiat?a", source )
outputChatBox ( "/swiatlablue - Niebieskie ?wiat?a", source )
outputChatBox ( "/swiatlagreen - Zielone ?wiat?a", source )
end
addCommandHandler ("swiatla", changeCarLightsColor )


addEventHandler("onClientMarkerHit", Marker, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ("Wpisz /swiatla aby ujrze? informacje, oraz cennik nt. monta?u ?wiate?", 250, 250, 250, true )
end)

function red( thePlayer )
if isElementWithinMarker(thePlayer, Marker) then
triggerServerEvent ("red", localPlayer, localPlayer)
end
end
addCommandHandler ("swiatlared", red)

function orange( thePlayer )
if isElementWithinMarker(thePlayer, Marker) then
triggerServerEvent ("orange", localPlayer, localPlayer)
end
end
addCommandHandler ("swiatlaorange", orange)

function blue...
4. Tablica z Markerami - isElementWithinMarker
Jak wygl?da?by warunek
 if isElementWithinMarker(player,markerthen
je?eli posiadam Tablice z markerami?