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

Wysłany: 2018-02-16, 22:24


IgorPL222

LUA






Wiek: 26
Na forum: 3112 dni
Posty: 133
Nick w MP: mxgvr

Piwa: 746

Respekt: 55,3

Siema!
Zrobi?em taki skrypt, aby usuwa?o samoch?d po wyj?ciu z serwera.
Lecz gdy dzi? to przetestowa?em, to nie wa?ne kto wyjdzie z serwera, to i tak usunie ten pojazd, a chcia?bym ?eby usuwa?o, tylko wtedy gdy wyjdzie osoba, kt?ra w nim siedzia?a.

B??d?w w DB3 Nie ma.
Kod ServerSide:

addEvent("onPlayerQuit"true)
addEventHandler "onPlayerQuit"getRootElement(), function()
if isElement (woz) and woz then
destroyElement (woz)
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-17, 01:21


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4700 dni
Posty: 372
Nick w MP: Hades

Piwa: 3214

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8


addEvent("onPlayerQuit"true)
addEventHandler "onPlayerQuit"getRootElement(), function(woz)
if isElement (woz) and woz then
destroyElement (woz)
end
end)


Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-17, 15:08


IgorPL222

LUA






Wiek: 26
Na forum: 3112 dni
Posty: 133
Nick w MP: mxgvr

Piwa: 746

Respekt: 55,3

Damian2511, tym razem wcale nie usuwa.

Podpis
discord: mxgvr
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-17, 15:37


Kalizman







Wiek: 23
Na forum: 3652 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Poka? kod, i DB3.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-17, 15:43


IgorPL222

LUA






Wiek: 26
Na forum: 3112 dni
Posty: 133
Nick w MP: mxgvr

Piwa: 746

Respekt: 55,3

Kalizman, Okej.
W DB3 nic mi nie wyskakuje.
Kod:

addEvent("zresp"true)
addEventHandler("zresp"root, function(value,value2)
    if not tonumber(valuethen return end
    woz createVehicle value2173.49951, -2265.9448213.36444 100, -135 )
    setVehicleColorwoz255255)
    warpPedIntoVehicle sourcewoz )
    setElementModel(source,164)
    end)

addEvent("onPlayerQuit"true)
addEventHandler "onPlayerQuit"getRootElement(), function()
if isElement (woz) and woz then
destroyElement (woz)
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-17, 17:17


NoKill1997

Online






Wiek: 28
Na forum: 3224 dni
Posty: 183
Nick w MP: Mefedroniarz.PDW

Piwa: 778

Respekt: 80,5

addEvent("onPlayerQuit"true)
addEventHandler "onPlayerQuit"getRootElement(), function()
     if woz[sourcethen
          if isElement(woz[source]) then destroyElement(woz[source]) end
    end
end)


Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-17, 17:22


IgorPL222

LUA






Wiek: 26
Na forum: 3112 dni
Posty: 133
Nick w MP: mxgvr

Piwa: 746

Respekt: 55,3

NoKill1997, jak wychodze z serwera, to nadal nie usuwa si? pojazd.

Podpis
discord: mxgvr
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-18, 14:38


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

Zobacz tak
addEvent("onPlayerQuit"true)
addEventHandler "onPlayerQuit"getRootElement(), function()
if woz then
if isElement(wozthen destroyElement(wozend
end
end)


Podpis

Kontakt
Discord: Qwertick#1210

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-02-21, 07:50


CjPomarancza

:-)






Wiek: 17
Na forum: 3184 dni
Posty: 90

Piwa: 12

Respekt: 60

 

addEvent("zresp"true)
addEventHandler("zresp"root, function(value,value2)
    if not tonumber(valuethen return end
    woz createVehicle value2173.49951, -2265.9448213.36444 100, -135 )
    setVehicleColorwoz255255)
    warpPedIntoVehicle sourcewoz )
    setElementModel(source,164)
    end)

addEvent("onPlayerQuit"true)
addEventHandler "onPlayerQuit"getRootElement(), function()
if isElement (woz) and woz and getVehicleController(woz) == source then 
destroyElement (woz)
end
end)


Podpis
Pomogłem? Doceń mnie i postaw :piwo: :)
Postaw piwo autorowi tego posta
 

 
Tagi: nie :: działa :: usuwanie :: pojazdu :: przy :: wyjściu :: serwera
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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