Wysłany: 2015-12-23, 20:43
serek123
Lua, MySql, Sql
Wiek: 27 Na forum: 4334 dni Posty: 217
Nick w MP: Serek.
Piwa : 374
Po wej?ciu w ma?y marker nie wyskakuje informacja o tym czy pojazd si? w nim znajduje czy nie
maly = createMarker (- 1994.55 , 210.71 , 26.69 , "cylinder" , 1 , 0 , 0 , 0 , 150 )
duzy = createMarker (- 1989.56 , 204.28 , 26.12 , "cylinder" , 5 , 0 , 0 , 0 , 100 )
function test ( plr , auto )
for k , v in ipairs ( getElementsByType ( "vehicle" )) do
if isElementWithinMarker ( v , duzy ) then
outputChatBox ( "Nie ma pojazdu w markerze" )
else
outputChatBox ( "Pojazd znajduje si? w markerze" )
end
end
end
addEventHandler ( "onMarkerHit" , maly , test )
Wysłany: 2015-12-23, 21:29
Tostuch
Wiek: 27 Na forum: 4931 dni Posty: 483
Nick w MP: Tost
Piwa : 137
Po pierwsze zamie? informacje
Po drugie, jakie? b??dy?
Wysłany: 2015-12-23, 22:09
serek123
Lua, MySql, Sql
Wiek: 27 Na forum: 4334 dni Posty: 217
Nick w MP: Serek.
Piwa : 374
Wysłany: 2015-12-23, 22:37
_Wicek_
Majstersztyk
Wiek: 25 Na forum: 4261 dni Posty: 747
Nick w MP: Wicek
Piwa : 1841
Zrobi?e? Event ?e jak gracz/pojazd wjedzie w marker , a ty p??niej sprawdzasz w tej samej FUNKCJI i EVENCIE czy gracz/pojazd jest w innym markerze .
Gdzie tu logika ?
maly = createMarker (- 1994.55 , 210.71 , 26.69 , "cylinder" , 1 , 0 , 0 , 0 , 150 )
duzy = createMarker (- 1989.56 , 204.28 , 26.12 , "cylinder" , 5 , 0 , 0 , 0 , 100 )
function test ( plr , auto )
for k , v in ipairs ( getElementsByType ( "vehicle" )) do
if isElementWithinMarker ( v , duzy ) then ------------------ tutaj b ?? d
outputChatBox ( "Nie ma pojazdu w markerze" )
else
outputChatBox ( "Pojazd znajduje si? w markerze" )
end
end
end
addEventHandler ( "onMarkerHit" , maly , test )
Podpis
Support-Team: 25.01.2016
Moderator: 10.07.2016
GG: 51274621
Skype : kuba_wicinski
Wysłany: 2015-12-28, 21:53
#404
Wiek: 26 Na forum: 4772 dni Posty: 1438
Piwa : 2512
maly = createMarker (- 1994.55 , 210.71 , 26.69 , "cylinder" , 1 , 0 , 0 , 0 , 150 )
duzy = createMarker (- 1989.56 , 204.28 , 26.12 , "cylinder" , 5 , 0 , 0 , 0 , 100 )
function test ( plr , md )
if #getElementsWithinMarker(duzy) == 1 then
-- jeden pojazd
else
-- wiecej lub 0
end
end
addEventHandler ( "onMarkerHit" , maly , test )
function getElementsWithinMarker ( marker )
if ( not isElement ( marker ) or getElementType ( marker ) ~= "marker" ) then
return false
end
local markerColShape = getElementColShape ( marker )
local elements = getElementsWithinColShape ( markerColShape )
return elements
end
Tagi: nie :: działa :: wykrywanie :: pojazdu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: