Wysłany: 2014-12-19, 18:54
cayman11
Wiek: 30 Na forum: 4948 dni Posty: 73
Ot?? zrobi?em system na prywatne samochody, oraz blip gdzie si? znajduj?. Ale mam problem, gdy, np. Sprzedam pojazd to blip mi zostaje, jak to usun??? destroyElement - ale gdzie to wsadzi??
local time = 10000
function veh_blips ()
for i , v in pairs ( getElementsByType ( "vehicle" )) do
if getElementData ( v , "type" )== 1 then
if getElementData ( v , "owner" )== getElementData ( localPlayer , "pdid" ) then
createBlipAttachedTo ( v , 0 , 1 , 255 , 0 , 0 , 255 , 0 , 9999 , localPlayer )
end
--[[elseif getElementData ( v , "type" )== 2 then
if getElementData ( v , "owner" )== getElementData ( localPlayer , "faction" ) then
createBlipAttachedTo ( v , 0 , 1 , 255 , 116 , 13 , 255 , 0 , 9999 , localPlayer )
end --]]
end
end
end
setTimer ( veh_blips , time , 0 )
Wysłany: 2014-12-19, 19:02
TheTroll
Pan Majster
Wiek: 38 Na forum: 4764 dni Posty: 219
Nick w MP: TheTroll
Piwa : 1114
U?yj takie funkcji. Nie testowane wi?c nie wiem czy dzia?a
function destroyBlipAttachedTo ( element )
local attachedElements = getAttachedElements ( element )
if attachedElements then
for i , attachedElement in ipairs ( attachedElements ) do
if getElementType ( attachedElement ) == "blip" then
destroyElement ( attachedElement )
end
end
end
end
U?ycie: destroyBlipAttachedTo(element)
Wysłany: 2014-12-19, 20:16
cayman11
Wiek: 30 Na forum: 4948 dni Posty: 73
Nie dzia?a. Mo?liwe, ?e co? ?le robi?.
Wysłany: 2014-12-19, 20:18
Terr9909
Skrypter LUA
Wiek: 26 Na forum: 4234 dni Posty: 346
Nick w MP: Split
Piwa : 1043
u?yj:
destroyBlipAttachedTo ( element )
podczas sprzedawania pojazdu graczowi.
Tagi: blip :: prywatny :: samochód.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: