Wysłany: 2017-03-21, 22:10
Krzemo1234
Wiek: 26 Na forum: 3751 dni Posty: 387
Nick w MP: Krzemo
Piwa : 16
Witam mam drzwi pod scrolla scroluje i nic si? nie dzieje
bm5 = createMarker ( 2329.49731 , 2486.36792 , 1028.81982 , "cylinder" , 1.0 , 0 , 0 , 0 , 0 ) -- gdzie ma byc marker w ktorym bedzie sie scrollowac
d5 = createObject ( 2930 , 2330 , 2488.400390625 , 1030.5 , 0 , 0 , 0 ) -- podajesz koordy obiektu
local kategoria_animacji = "CRIB"
local animacja = "CRIB_Use_Switch"
function isPlayerInPoliceFaction ( plr )
local uid = getElementData ( plr , 'player:uid' )
if not uid then return end
local result = exports [ 'pystories-db' ]: dbGet ( 'SELECT 1 FROM ogrpg_factions WHERE code=? AND uid=? LIMIT 1;' , "SAPD" , uid )
if result [ 1 ] then
return true
else
return false
end
end
function od6 ( thePlayer )
if isElementWithinMarker ( thePlayer , bm5 ) then
if isPlayerInPoliceFaction ( thePlayer ) then -- Tutaj zmieniasz tylko "Policja"
moveObject ( d5 , 2500 , 2330 , 2490.12 , 1030.5 ) -- Koordy otwartych drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
setPedAnimation ( thePlayer , kategoria_animacji , animacja , true , false , false )
end
end
end
function zd6 ( thePlayer )
if isElementWithinMarker ( thePlayer , bm5 ) then
if isPlayerInPoliceFaction ( thePlayer ) then -- Tutaj zmieniasz tylko "Policja"
moveObject ( d5 , 2500 , 2330 , 2488.400390625 , 1030.5 ) -- koordy zamknietch drzwi
setTimer ( setPedAnimation , 1066.66 , 1 , thePlayer )
setPedAnimation ( thePlayer , kategoria_animacji , animacja , true , false , false )
end
end
end
addCommandHandler ( "od1" , od1 ) -- haslo otwartych drzwi
addCommandHandler ( "zd1" , zd1 ) -- haslo zamknietych drzwi
addEventHandler ( "onPlayerJoin" , root ,function()
bindKey ( source , "mouse_wheel_down" , od1 )
bindKey ( source , "mouse_wheel_up" , zd1 )
end )
function onStart ()
for k , source in pairs ( getElementsByType ( "player" )) do
bindKey ( source , "mouse_wheel_down" , od1 )
bindKey ( source , "mouse_wheel_up" , zd1 )
end
end
addEventHandler ( "onResourceStart" , root , onStart )
B??d DB3 : http://imgur.com/a/28FrK
Wysłany: 2017-03-22, 14:52
Demic
Lua&Mapping
Wiek: 29 Na forum: 4247 dni Posty: 63
Nick w MP: Demic
Piwa : 620
Nie lepiej zrobi? to pod Marker/ColShape ?
Wysłany: 2017-03-22, 17:40
Krzemo1234
Wiek: 26 Na forum: 3751 dni Posty: 387
Nick w MP: Krzemo
Piwa : 16
Jakie? pomys?y
Podpis
Jeśli ci pomogłem zostaw zimne
Wysłany: 2017-03-22, 23:01
MrDadosz
Wiek: 27 Na forum: 5652 dni Posty: 33
Nick w MP: Damian_Red, MrDadosz
Piwa : 11
addCommandHandler ( "od1" , od1 ) -- haslo otwartych drzwi
addCommandHandler ( "zd1" , zd1 ) -- haslo zamknietych drzwi
zmie? na
addCommandHandler ( "od1" , od6 ) -- haslo otwartych drzwi
addCommandHandler ( "zd1" , zd6 ) -- haslo zamknietych drzwi
bindKey ( source , "mouse_wheel_down" , od1 )
bindKey ( source , "mouse_wheel_up" , zd1 )
zmie? na
bindKey ( source , "mouse_wheel_down" , "down" , od6 )
bindKey ( source , "mouse_wheel_up" , "down" , zd6 )
Tagi: scroluje :: nic :: się :: nie :: dzieje
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: