[SOLVED] a_Player:SetNormalMaxSpeed(0)
#4
Pretty much the only thing I could think of in this situation without changing the FoV is using the OnPlayerMoving hook like so:


-- Lets have a table containing names of players that cannot move
StopMove = {}

-- Also, lets assume that their name was already inserted into the table somehow

function OnPlayerMoving(Player)
    -- Search through the table as key-value format
    for _, k in pairs(StopMoving) do
        -- If the player's name happens to match a name in the table, stop them
        if Player:GetName() == k then
            -- Returning true means that the plugin has handled the player movement itself and the server doesn't have to perform any further actions
            return true
        end
    end
end

Reply
Thanks given by: heroldini


Messages In This Thread
RE: a_Player:SetNormalMaxSpeed(0) - by NiLSPACE - 11-09-2015, 08:00 PM
RE: a_Player:SetNormalMaxSpeed(0) - by heroldini - 11-09-2015, 08:09 PM
RE: [SOLVED] a_Player:SetNormalMaxSpeed(0) - by DiamondToaster - 11-10-2015, 06:25 AM



Users browsing this thread: 1 Guest(s)