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

Wysłany: 2018-09-11, 20:22


Nywis







Wiek: 29
Na forum: 2847 dni
Posty: 60
Nick w MP: Nywis

Piwa: 14

Respekt: 45,3

Witam, posiadam skrypt na publiczne rowerki, ktore sa rozmieszczone na spawnie, przecho itp., lecz gdy zaladuje skrypt, to rowerki posiadaja dzialaj?ca interakcje pojazdu, maja zaciagniety hamulec reczny, oraz trzeba odpalic silnik, aby moc jechac tym rowerkiem, lecz gdy klikam SHIFT to interakcja mi sie nie pojawia i nie mam zadnej opcji interakcyjnej, oraz te rowerki po zaladowaniu skryptu, lub gdy ktos je porzuci, respia sie one nad ziemia, zamiast rowno na ziemi, ktos wie jak to ogarnac?

Skrypt:

https://pastebin.com/NACGsfH1

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-11, 20:28


Query

SyndicateMTA






Wiek: 24
Na forum: 3071 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

Daj kod od interakcji pojazdu.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-11, 21:08


Nywis







Wiek: 29
Na forum: 2847 dni
Posty: 60
Nick w MP: Nywis

Piwa: 14

Respekt: 45,3

"darecky02" napisał/a:

Daj kod od interakcji pojazdu.


https://pastebin.com/CxMAukLL

https://pastebin.com/AP4NxCvn

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-11, 21:42


Wilq







Wiek: 24
Na forum: 4428 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

S-SIDE:


--[[
    AuthorAteX<atexprogramming@gmail.com>
    EditBone<bone.pystories@gmail.com>
]]--
 
local rowery = {[509]=true,[481]=true,[462]=true,[510]=true}
 
addEvent("silnik",true)
addEventHandler("silnik",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        local silnik getVehicleEngineState(v)
        local przeb getElementData (v"vehicle:mileage")
        if silnik == false then
       -- if przeb 100000 then
            setVehicleEngineState(v,true)
        else
            setVehicleEngineState(v,false)
       -- end
    end
end
end)
 
addEvent("lampy",true)
addEventHandler("lampy",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        if getVehicleOverrideLights(v) ~= 2 then
            setVehicleOverrideLights(v,2)
        else
            setVehicleOverrideLights(v,1)
        end
    end
end)
 
addEvent("drzwi",true)
addEventHandler("drzwi",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        local drzwi isVehicleLocked(v)
        if drzwi == true then
            setVehicleLocked(v,false)
        else
            setVehicleLocked(v,true)
        end
    end
end)
 
addEvent("handbrake",true)
addEventHandler("handbrake",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
   
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
        if getElementData(v,"blokada:reczny_drwal"then
        outputChatBox("* Spuszczanie r?cznego, nie dzia?a na pracy Drwala."source)
        return end
        if getElementData(v,"blokada:reczny_latdziur"then
        outputChatBox("* Spuszczanie r?cznego, nie dzia?a na pracy ?atacza dziur."source)
        return end
   
        if isElementFrozen(vthen
            setElementFrozen(v,false)
        else
            setElementFrozen(v,true)
        end
    end
end)
 
addEvent("maska",true)
addEventHandler("maska",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        if getVehicleDoorOpenRatio(v,0) == 0 then
            setVehicleDoorOpenRatio(v,0,1,2000)
        else
            setVehicleDoorOpenRatio(v,0,0,2000)
        end
    end
end)
 
addEvent("baga?nik",true)
addEventHandler("baga?nik",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        if getVehicleDoorOpenRatio(v,1) == 0 then
            setVehicleDoorOpenRatio(v,1,1,2000)
        else
            setVehicleDoorOpenRatio(v,1,0,2000)
        end
    end
end)
 
addEventHandler("onVehicleEnter",root,function(plr,seat)
    if seat == 0 then
        if rowery[getElementModel(source)] then return end
        setVehicleEngineState(source,false)
    end
end)
 
addEventHandler("onVehicleStartExit",root,function(plr,seat)
    if seat == 0 then
        veh getPedOccupiedVehicle(plr)
        if rowery[getElementModel(veh)] then return end
        v getPedOccupiedVehicle(plr)
    end
end)
 
addEventHandler("onVehicleExit",root,function(plr,seat)
    if seat == 0 then
        if not v then return end
        setVehicleEngineState(v,false)
        setVehicleLocked(v,false)
        nil
    end
end)


W tabeli z rowerami nie mia?e? ID rower?w, kt?re s? jako rowery publiczne.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-12, 14:16


Nywis







Wiek: 29
Na forum: 2847 dni
Posty: 60
Nick w MP: Nywis

Piwa: 14

Respekt: 45,3

"Wilq" napisał/a:

S-SIDE:


--[[
    AuthorAteX<atexprogramming@gmail.com>
    EditBone<bone.pystories@gmail.com>
]]--
 
local rowery = {[509]=true,[481]=true,[462]=true,[510]=true}
 
addEvent("silnik",true)
addEventHandler("silnik",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        local silnik getVehicleEngineState(v)
        local przeb getElementData (v"vehicle:mileage")
        if silnik == false then
       -- if przeb 100000 then
            setVehicleEngineState(v,true)
        else
            setVehicleEngineState(v,false)
       -- end
    end
end
end)
 
addEvent("lampy",true)
addEventHandler("lampy",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        if getVehicleOverrideLights(v) ~= 2 then
            setVehicleOverrideLights(v,2)
        else
            setVehicleOverrideLights(v,1)
        end
    end
end)
 
addEvent("drzwi",true)
addEventHandler("drzwi",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        local drzwi isVehicleLocked(v)
        if drzwi == true then
            setVehicleLocked(v,false)
        else
            setVehicleLocked(v,true)
        end
    end
end)
 
addEvent("handbrake",true)
addEventHandler("handbrake",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
   
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
        if getElementData(v,"blokada:reczny_drwal"then
        outputChatBox("* Spuszczanie r?cznego, nie dzia?a na pracy Drwala."source)
        return end
        if getElementData(v,"blokada:reczny_latdziur"then
        outputChatBox("* Spuszczanie r?cznego, nie dzia?a na pracy ?atacza dziur."source)
        return end
   
        if isElementFrozen(vthen
            setElementFrozen(v,false)
        else
            setElementFrozen(v,true)
        end
    end
end)
 
addEvent("maska",true)
addEventHandler("maska",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        if getVehicleDoorOpenRatio(v,0) == 0 then
            setVehicleDoorOpenRatio(v,0,1,2000)
        else
            setVehicleDoorOpenRatio(v,0,0,2000)
        end
    end
end)
 
addEvent("baga?nik",true)
addEventHandler("baga?nik",root,function()
    local v getPedOccupiedVehicle(source)
    if v then
        if getElementData(v,"recznySalonData"then
        outputChatBox("* Interakcja, nie dzia?a na pojazd z Salonu / Cygana."source)
        return end
       
        if getVehicleDoorOpenRatio(v,1) == 0 then
            setVehicleDoorOpenRatio(v,1,1,2000)
        else
            setVehicleDoorOpenRatio(v,1,0,2000)
        end
    end
end)
 
addEventHandler("onVehicleEnter",root,function(plr,seat)
    if seat == 0 then
        if rowery[getElementModel(source)] then return end
        setVehicleEngineState(source,false)
    end
end)
 
addEventHandler("onVehicleStartExit",root,function(plr,seat)
    if seat == 0 then
        veh getPedOccupiedVehicle(plr)
        if rowery[getElementModel(veh)] then return end
        v getPedOccupiedVehicle(plr)
    end
end)
 
addEventHandler("onVehicleExit",root,function(plr,seat)
    if seat == 0 then
        if not v then return end
        setVehicleEngineState(v,false)
        setVehicleLocked(v,false)
        nil
    end
end)


W tabeli z rowerami nie mia?e? ID rower?w, kt?re s? jako rowery publiczne.


Zrobi?em tak, wsiad?em na BMX (462) i nie chcia? jecha?, interakcja pod SHIFT sie nie pojawiala, jak spojrzalem na licznik, to widzialem ze silnik jest zgaszony, ale jak mam odpalic silnik w bmx...?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-09-12, 16:05


Query

SyndicateMTA






Wiek: 24
Na forum: 3071 dni
Posty: 319
Nick w MP: Query

Piwa: 5257

Respekt: 141
Respekt: 141

Z tej tabeli nie powinien si? znajdowa? id roweru. Sprawdzi?em i dzia?a wi?c wystarczy usun?? tylko id 462

Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: interakcja :: rowerow
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