Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-01-22, 00:02


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

Owy blip kt?ry si? respi nie usuwa si? jak respi si? nast?pny helicrash

chcia? bym aby blip po godzinie si? usuwa? i gdy zrespi si? za 1 godzine nast?pny helicrash to blip respi si? na nowym helicrashu ka?dy wie jak wygl?da to na dayz

function createHeliCrashSite()
    if cargoCol then
        destroyElement(getElementData(cargoCol,"parent"))
        destroyElement(cargoCol)
    end
    local item_id math.random(table.size(heliCrashSites))
    local x,y,heliCrashSites[item_id][1],heliCrashSites[item_id][2],heliCrashSites[item_id][3]
    cargobob createVehicle(548,x,y,z,nil,nil,nil)
    cargobob1 createBlip(x,y,z,5)
    blowVehicle(cargobob)
    setElementFrozen(cargobob,true)
    setVehicleLocked(cargobob,true)
    cargoCol createColSphere(x,y,z,3)
    setElementData(cargoCol,"parent",cargobob)
    setElementData(cargoCol,"helicrash",true)
    setElementData(cargoCol,"MAX_Slots",0)
    setElementData(cargoCol"M4"13)
    setElementData(cargoCol"Coyote Backpack"5)
    setElementData(cargoCol"M4 Mag"25)
    setElementData(cargoCol"MP5A5"13)
    setElementData(cargoCol"MP5A5 Mag"25)
    setElementData(cargoCol"Ghillie Suit"7)
    setElementData(cargoCol"GPS"15)
    setElementData(cargoCol"Map"15)
    setElementData(cargoCol"CZ 550"8)
    setElementData(cargoCol"CZ 550 Mag"16)
    setElementData(cargoCol"AK-47"13)
    setElementData(cargoCol"AK Mag"25)
    outputChatBox "[Vulgar-DayZ]Helicrash he crashed on the map, in a helicopter is a lot of weapons."getRootElement(), 25500true )
    setTimer(createHeliCrashSite,3600000,1)


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-22, 02:13


nanKy







Wiek: 22
Na forum: 3866 dni
Posty: 498
Nick w MP: nanky

Piwa: 1773

Respekt: 239
Respekt: 239Respekt: 239

a end do timera?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-22, 11:11


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

NankY., przeczytaj funkcje setTimer najpierw a potem si? wypowiadaj.OskarYT, wystarczy ?e przy tworzeniu tego heli zrobisz godzinny timer na wywo?anie osobnej funkcji kt?ra usuwa blip i heli i tworzy now? przez funkcj? createHeliCrashSite

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-22, 16:16


OskarYT

Mapper MTA






Wiek: 26
Na forum: 4245 dni
Posty: 267
Nick w MP: Kaczorek2306

Piwa: 1230

Respekt: 85,3

Doda?em pare linijek i powinno all dzia?ac ale nie usuwa blip?w ci?gle blipy zostaj? ....


function createHeliCrashSite()
    if cargoCol then
        destroyElement(getElementData(cargoCol,"blip"))
        destroyElement(getElementData(cargoCol,"parent"))
        destroyElement(cargoCol)
    end
    local item_id math.random(table.size(heliCrashSites))
    local x,y,heliCrashSites[item_id][1],heliCrashSites[item_id][2],heliCrashSites[item_id][3]
    cargobob createVehicle(548,x,y,z,nil,nil,nil)
    cargobob1 createBlip(x,y,z,5) 
    setElementData(cargoCol,"blip",cargobob1)
    blowVehicle(cargobob)
    setElementFrozen(cargobob,true)
    setVehicleLocked(cargobob,true)
    cargoCol createColSphere(x,y,z,3)
    setElementData(cargoCol,"parent",cargobob)
    setElementData(cargoCol,"helicrash",true)
    setElementData(cargoCol,"MAX_Slots",0)
    setElementData(cargoCol"M4"13)
    setElementData(cargoCol"Coyote Backpack"5)
    setElementData(cargoCol"M4 Mag"25)
    setElementData(cargoCol"MP5A5"13)
    setElementData(cargoCol"MP5A5 Mag"25)
    setElementData(cargoCol"Ghillie Suit"7)
    setElementData(cargoCol"GPS"15)
    setElementData(cargoCol"Map"15)
    setElementData(cargoCol"CZ 550"8)
    setElementData(cargoCol"CZ 550 Mag"16)
    setElementData(cargoCol"AK-47"13)
    setElementData(cargoCol"AK Mag"25)
    outputChatBox "[Vulgar-DayZ]Helicrash he crashed on the map, in a helicopter is a lot of weapons."getRootElement(), 25500true )
    setTimer(createHeliCrashSite,360000,1)
end
createHeliCrashSite()


[ Dodano: 2017-01-23, 19:44 ]
@up prosz? o pomoc !

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: helicrash
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » helicrash Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku