Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Jail = createObject(974, 1019.4799804688,-314.10998535156, 65.069999694824, 0, 0, 180)
- local Keyrb1 = createObject(2886, 1016.3699951172,-315.26, 74.379997253418, 0, 0, 360)
- local Jailstatus = 0
- local Jailtime = 0
- function resetJailRedbrothers()
- Jailtime = 0
- Jailstatus = 0
- end
- addEventHandler("onElementClicked", Keyrb1, function(theButton, theState, thePlayer)
- if (theState == "down") and (theButton == "left") then
- if (getDistanceBetweenElements(thePlayer, source) > 15) then return end
- if(getPlayerFraktion(thePlayer) ~= 6) then return end
- if(Jailtime == 1) then return end
- if(Jailstatus == 0) then
- Jailtime = 1
- Jailstatus = 1
- local X, Y, Z = getElementPosition(Jail)
- moveObject(Jail, 1000, X, Y, Z-3, 0, 0, 0, "InOutQuad")
- setTimer(resetJailRedbrothers, 1100, 1)
- else
- Jailtime = 1
- Jailstatus = 0
- local X, Y, Z = getElementPosition(Jail)
- moveObject(Jail, 1000, X, Y, Z+3, 0, 0, 0, "InOutQuad")
- setTimer(resetJailRedbrothers, 1100, 1)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment