Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local seated=false
- function setPlayerSeated()
- for id,screen in pairs(screens) do
- if isElementWithinColShape(getLocalPlayer(),screen.col)==false or getElementDimension(localPlayer) ~= 5 or getElementInterior(localPlayer) ~= 5 then
- local x,y,z=getElementPosition(getLocalPlayer())
- local sx,sy,sz=getElementPosition(screen.screen)
- setCameraMatrix(x,y,z+1,sx,sy,sz)
- seated=true
- end
- end
- end
- addCommandHandler("sit",setPlayerSeated)
- function setPlayerStanding()
- if seated==true then
- setCameraTarget(getLocalPlayer())
- seated=false
- end
- end
- addCommandHandler("stopanim",setPlayerStanding)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement