Wysłany: 2015-01-06, 12:22
polskianimal
Skrypter
Wiek: 24 Na forum: 4198 dni Posty: 77
Nick w MP: polskianimal
Piwa : 1
Witam wszystkich, mam problem z destroyElement. Chodzi mi o to ?e gdy gracz wejdzie w marker to ten sie nie usuwa.
Kod:
Kod: start = createMarker(-2532.5,-616.09997558594,131.60000610352,"cylinder",2,254,0,0,255,getRootElement())
function ladowanie (hitElement)
outputChatBox ( "Podje?e? prace reportera, jedz do miejsca oznaczonego blipem na mapie",hitElement)
local yolo = createMarker(-2142.1000976563,-221.69999694824,34.299999237061,"cylinder",2,255,0,0,255,getRootElement())
local blip = createBlip ( -2142.1000976563, -221.69999694824, 34.299999237061, 41, 0, 0, 0, 255, myPlayer )
end
addEventHandler("onMarkerHit",start,ladowanie)
function koniec (hitElement,thePlayer,amount)
if yolo then
if isElement( yolo ) then
destroyElement( yolo )
givePlayerMoney ( thePlayer, 75 )
outputChatBox ( "Zako?czy?e? prace.Zarobek: +75 euro",hitElement)
end
end
end
addEventHandler("onMarkerHit",getRootElement(),koniec)
PS: Ostatni patrzy?em sobie na inne kody i tam by?o napisane destroyElement w client. Czy to nie jest w tym problem bo ca?y kod jest po stronie serwera. Za wszelk? pomoc bardzo dzi?kuje
Wysłany: 2015-01-06, 12:40
Bingwin
LUA MTA
Wiek: 27 Na forum: 4191 dni Posty: 95
Nick w MP: Bingwin
Piwa : 2070
Spr?buj tym sposobem .
if source == marker2 then
destroyElement ( marker2 )
marker3 = createMarker ( - 1920.1708984375 , 1180.35546875 , 43.954963684082 , "cylinder" , 3.0 , 255 , 0 , 0 , 100 )
end
if source == marker3 then
destroyElement ( marker3 )
marker4 = createMarker ( - 2146.36328125 , 1179.4248046875 , 54.236248016357 , "cylinder" , 3.0 , 255 , 0 , 0 , 100 )
end
Wysłany: 2015-01-06, 12:54
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Kod jest zasyfiony ale spr?buj :
start = createMarker (- 2532.5 ,- 616.09997558594 , 131.60000610352 , "cylinder" , 2 , 254 , 0 , 0 , 255 , getRootElement ())
function ladowanie ( hitElement )
outputChatBox ( "Podje?e? prace reportera, jedz do miejsca oznaczonego blipem na mapie" , hitElement )
local yolo = createMarker (- 2142.1000976563 ,- 221.69999694824 , 34.299999237061 , "cylinder" , 2 , 255 , 0 , 0 , 255 , getRootElement ())
local blip = createBlip ( - 2142.1000976563 , - 221.69999694824 , 34.299999237061 , 41 , 0 , 0 , 0 , 255 , myPlayer )
end
addEventHandler ( "onMarkerHit" , start , ladowanie )
function koniec ( hitElement , thePlayer , amount )
if source == yolo then
destroyElement ( yolo )
givePlayerMoney ( thePlayer , 75 )
outputChatBox ( "Zako?czy?e? prace.Zarobek: +75 euro" , hitElement )
end
end
addEventHandler ( "onMarkerHit" , getRootElement (), koniec )
Wysłany: 2015-01-06, 13:01
polskianimal
Skrypter
Wiek: 24 Na forum: 4198 dni Posty: 77
Nick w MP: polskianimal
Piwa : 1
Shuffle ,
Tak wiem ?e jest zasyfiony ,ale pr?ba nic nie da?a
Tagi: niszczenie :: markera
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: