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

Wysłany: 2022-02-13, 15:40


Norbert1234

Nie umiem w LUA






Wiek: 22
Na forum: 3987 dni
Posty: 319
Nick w MP: Gusterowskyy

Piwa: 242

Respekt: 60


addCommandHandler("auto", function(plrcmdid)
if getElementData(plr"user:duty") >2 then
if not id then 
outputChatBox("U?yj /auto id"plr255255255true)

 return end
local dim getElementDimension(plr)
local x,y,getElementPosition(plr)
local r1,r2,r3 getElementRotation(plr)
local xygetElementPosition(plr)
 if getPedOccupiedVehicle(plrthen
outputChatBox("Nie mo?esz podmienia? aut",plr)
else
local veh createVehicle(idxyzr1r2r3)
setElementDimension(vehdim)
setElementPosition(plr,xyz+1.5)
setVehiclePlateText(veh"RESPIONY"setElementData(veh"veh:bak",100setElementData(veh"veh:pojemno??","2"setElementData(veh"veh:mk1"setVehicleOverrideLights(veh2)
addVehicleUpgrade(veh1080)
setVehicleColor(veh255,255,255)
if seat ~= 0 then return end
destroyElement(source)
addEventHandler("onVehicleExit"veh, function(plr,seat)
end)
end
end
end)

kto? wyt?umaczy mi dlaczego po wyjsciu nie usuwa sie? czy mo?e czego? nie widze?

[ Dodano: 2022-02-13, 16:05 ]
@lock

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-22, 09:08


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3



addCommandHandler("auto", function(plrcmdid)


if getElementData(plr"user:duty") >2 then


if not id then 


outputChatBox("U?yj /auto id"plr255255255true)





 return end


local dim getElementDimension(plr)


local x,y,getElementPosition(plr)


local r1,r2,r3 getElementRotation(plr)


local xygetElementPosition(plr)


 if getPedOccupiedVehicle(plrthen


outputChatBox("Nie mo?esz podmienia? aut",plr)


else


local veh createVehicle(idxyzr1r2r3)


setElementDimension(vehdim)


setElementPosition(plr,xyz+1.5)


setVehiclePlateText(veh"RESPIONY"setElementData(veh"veh:bak",100setElementData(veh"veh:pojemno??","2"setElementData(veh"veh:mk1"setVehicleOverrideLights(veh2)


addVehicleUpgrade(veh1080)


setVehicleColor(veh255,255,255)





addEventHandler("onVehicleExit"veh, function(plr,seat)
    if seat ~= 0 then return end


    destroyElement(source)

end)


end


end


end)

Spr?buj tak, nie dzia?a?o ci to poniewa? samo usuwanie pojazdu czyli destroyElement wstawia?e? nad funkcj? wysiadania.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-22, 17:07


_jvneczek







Wiek: 22
Na forum: 4325 dni
Posty: 1513
Nick w MP: _jvneczek

Piwa: 3949

Respekt: 337,5
Respekt: 337,5Respekt: 337,5Respekt: 337,5

[clo]

Postaw piwo autorowi tego posta
 

 
Tagi: usuwanie :: pojazdu
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