Ulysses
General => Developers Corner => Topic started by: Moka on February 20, 2013, 11:21:19 PM
-
Is there anyway I could stop all player movement when I call 'GM:ScoreboardShow()'?
Tried using 'GM:CreateMove' but seeing as the gmod wiki doesn't like having pages I need I come to ask you guys for some assistance.
Tried using 'GM:Move' but it doesn't seem to work.
-
what your asking could -not sure- be exploited to prevent fall damage floating in the air and other things if your talking stop as in no user key input just run on client
the - keys for movement or what ever it is its probably the cheating way but eh does the same thing in the end
-
I am trying to get the player to stop moving when the scoreboard is open. Like seeing if KeyDown IN_FORWARD or something then returning nothing.
-
just add concommands -foward -left -right -back
make sure you don't target every one
-
I think there are hooks for scoreboard viewing.
Research them, then combine them with a freeze command stuff we use in ULX.
EDIT - yep-
http://wiki.garrysmod.com/index.php?title=Hooks/Base/ScoreboardHide and http://wiki.garrysmod.com/index.php?title=Hooks/Base/ScoreboardShow
(No, they don't have content explaining, but heck, test them, learn how they work if you can, then update the Wiki.)
-
function My_ScoreBoardShow( ply )
ply:Freeze(true)
end
hook.Add("ScoreboardShow", "My_ScoreBoardShow", My_ScoreBoardShow)
function My_ScoreBoardHide( ply )
ply:Freeze(false)
end
hook.Add("ScoreboardHide", "My_ScoreBoardHide", My_ScoreBoardHide)
I did this from my phone in a hospital bed... There are no guarantees that this will outright work for you.
-
hospital bed :-\
hope you're alright?
-
Krooks, MrP went in for brain surgery.
Long story short, he's such a genius with a big brain that they had to remove some of it that was extending into his spinal column to prevent his head from exploding.
Or at least, prevent the headaches that had been happening for a long time due to his big brain.
(http://image.shutterstock.com/display_pic_with_logo/3288/98874164/stock-photo-man-before-big-brain-98874164.jpg)
[Though I joke, the medical condition he underwent surgery for did cause extension of brain and fluid into spinal column)
-
@.@ Not trying to hijack the thread, but sending prayers your way MrP! I hope they leave the good parts, like the parts that help us with lua. ;P