1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Player Speed?

Discussion in 'Modder General Chat' started by Testykles, Oct 8, 2015.

  1. Testykles

    Testykles New Member

    Anyone know a way to change the player speed When they join a job. E.G When i join the job flash my player speed increases.

    It's not urgent, so take your time. Thanks!
     
  2. Testykles

    Testykles New Member

    Ok Now Its Getting A Little Urgent. Anyone?
     
  3. Testykles

    Testykles New Member

    OK I Figured It Out The Command Is

    hook.Add("UpdatePlayerSpeed", "DarkRP_JobSpeed", function(ply)
    if ply:isArrested() then return end
    if ply:Team() == TEAM_TEAMNAME then
    GAMEMODE:SetPlayerSpeed(ply, GAMEMODE.Config.walkspeed * 1, GAMEMODE.Config.runspeed * 1)
    end
    end),

    (This goes into the jobs.lua File)
     
  4. Pab14567

    Pab14567 Well-Known Member

    You don't need a hook, lol.
    There's a field for plawer spawn haha
     
  5. Bo98

    Bo98 Moderator Staff Member Contributor

    Just a note that UpdatePlayerSpeed is deprecated now too. Set the player speed on spawn, through a player class or use GMod's move hooks.
     

Share This Page