Tematy otagowane jako: scroluje |
1. Scroluje i nic się nie dzieje |
Witam mam drzwi pod scrolla scroluje i nic się nie dzieje
[lua]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)
... |
|