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

Wysłany: 2016-09-01, 18:39


karat1







Wiek: 24
Na forum: 3758 dni
Posty: 95
Nick w MP: Karatos

Piwa: 4

Respekt: 50

Ostrzeżeń: 60%
Witajcie mam do was pytanie jak zrobi? drzwi na 2 markery o to kod
--]] Autor skryptuPatrix
--W bindach pomaga?: Atex
--W animacji pomaga?: Emm
--Zakaz zmiany autora![[--

bm createMarker(2383.78, -1668.6013.54"cylinder"1.0000255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
bm createMarker(2384.30, -1670.8314.55"cylinder"1.0000255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d createObject (3089,2383.89, -166913.89000) -- podajesz koordy obiektu

local kategoria_animacji "CRIB"
local animacja "CRIB_Use_Switch"

function od thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("SAPD")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d30892382.39, -166913.89 ) -- Koordy otwartych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
        end
    end
end

function zd thePlayer)
    if isElementWithinMarker(thePlayerbmthen
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("SAPD")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d3089,2383.89, -166913.89 ) -- koordy zamknietych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false) 
        end
    end
end
addCommandHandler("od"od ) -- haslo otwartych drzwi
addCommandHandler("zd"zd ) -- haslo zamknietych drzwi


addEventHandler("onPlayerJoin",root,function()
    bindKey(source,"mouse_wheel_down","both",animka) 
    bindKey(source,"mouse_wheel_up","both",animka2)
    bindKey(source,"mouse_wheel_down","both",od) 
    bindKey(source,"mouse_wheel_up","both",zd)
end)

addEventHandler("onResourceStart"resourceRoot, function()
for k,v in ipairs(getElementsByType("player")) do
    bindKey(v,"mouse_wheel_down","both",animka) 
    bindKey(v,"mouse_wheel_up","both",animka2)
    bindKey(v,"mouse_wheel_down","both",od) 
    bindKey(v,"mouse_wheel_up","both",zd)
end
end
)


[ Komentarz dodany przez: AteX: 2016-09-01, 18:40 ]
Stosuj znaczniki [lua][/lua]

Ostatnio zmieniony przez AteX 2016-09-01, 18:39, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-01, 20:36


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

--]] Autor skryptuPatrix
--W bindach pomaga?: Atex
--W animacji pomaga?: Emm
--Zakaz zmiany autora![[--

bm createMarker(2383.78, -1668.6013.54"cylinder"1.0000255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
bm2 createMarker(2384.30, -1670.8314.55"cylinder"1.0000255) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d createObject (3089,2383.89, -166913.89000) -- podajesz koordy obiektu

local kategoria_animacji "CRIB"
local animacja "CRIB_Use_Switch"

function od thePlayer)
    if isElementWithinMarker(thePlayerbm) or isElementWithinMarker(thePlayer,bm2then
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("SAPD")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d30892382.39, -166913.89 ) -- Koordy otwartych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false)
        end
    end
end

function zd thePlayer)
    if isElementWithinMarker(thePlayerbm) or isElementWithinMarker(thePlayer,bm2then
        if isObjectInACLGroup "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("SAPD")) then --Tutaj zmieniasz tylko "Policja"
            moveObject d3089,2383.89, -166913.89 ) -- koordy zamknietych drzwi
            setTimer(setPedAnimation1066.661thePlayer)
            setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false) 
        end
    end
end
addCommandHandler("od"od ) -- haslo otwartych drzwi
addCommandHandler("zd"zd ) -- haslo zamknietych drzwi


addEventHandler("onPlayerJoin",root,function()
    bindKey(source,"mouse_wheel_down","both",animka) 
    bindKey(source,"mouse_wheel_up","both",animka2)
    bindKey(source,"mouse_wheel_down","both",od) 
    bindKey(source,"mouse_wheel_up","both",zd)
end)

addEventHandler("onResourceStart"resourceRoot, function()
for k,v in ipairs(getElementsByType("player")) do
    bindKey(v,"mouse_wheel_down","both",animka) 
    bindKey(v,"mouse_wheel_up","both",animka2)
    bindKey(v,"mouse_wheel_down","both",od) 
    bindKey(v,"mouse_wheel_up","both",zd)
end
end

)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-01, 21:44


karat1







Wiek: 24
Na forum: 3758 dni
Posty: 95
Nick w MP: Karatos

Piwa: 4

Respekt: 50

Ostrzeżeń: 60%
Temat do zamkni?cia

Postaw piwo autorowi tego posta
 

 
Tagi: drzwi :: scrolla
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