Hello all!
Relatively new to LUA so please refrain from the hurtful comments :) .
Anyways I was trying to make it so that when a player joins the job Moderator On Duty (TEAM_MODERATORONDUTY), they would receive a Walk and Run speed boost (3x). So I created this script but for a reason I cannot see it doesn't work. The script is very short so I may seem like an idiot if it is obvious.
Anyway, any help is appreciated!
[CODE]
hook.Add("OnPlayerChangedTeam", "ModSpeed", function(ply, oldteam, newteam)
if newteam == TEAM_MODERATORONDUTY then
ply:SetWalkSpeed(750)
ply:SetRunSpeed(1500)
end
if oldteam == TEAM_MODERATORONDUTY then
ply:SetWalkSpeed(250)
ply:SetRunSpeed(500)
end
end )
[/CODE]
Sorry, you need to Log In to post a reply to this thread.