Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- BY DIABLOS / FOR WOLFY | PRICE: $15.00
- -- NO COPYRIGHT PRACTICED. FEEL FREE TO EDIT THAT AT YOUR OWN RISK.
- -- IF THAT WORKS FOR ME, THAT WORKS FOR YOU. I SUPPORT THIS SCRIPT ONE DAY AFTER THE PURCHASE. AFTER, NO BECAUSE IT IS VERY SMALL AND SHOULDN'T CREATE PROBLEMs.
- -- IF YOU NEED OTHER SCRIPTS, GO AT steamcommunity.com/id/diablosgamer
- -- [[ Runner and Juggernaut Script ]] --
- --local walkspeed = 160 -- The walk speed (equivalent to the speed in which we run) -- "Doesn't matter now, made the script clever." - Fillipuster
- local teamscantrun = { -- Put the name (not TEAM_ variable) of jobs who can't run
- "Juggernaut"
- }
- local function CantRun(ply, before, after)
- if table.HasValue(teamscantrun, team.GetName( after )) and ply:Alive() then
- ply:SetRunSpeed( ply:GetWalkSpeed() ) -- ply:SetRunSpeed( walkspeed )
- end
- end
- hook.Add("OnPlayerChangedTeam", "CantRun", CantRun)
- -- [[ Chat Command Script ]] --
- local timebetweeneverytrack = 240 -- Time (in seconds) for every track.
- local timeoftrackhud = 120 -- Time (in seconds) when the tracker sees the HUD information.
- local teamscantrackplayers = { -- Put the name (not TEAM_ variable) of jobs who can track players
- "Detective"
- }
- local tableofpeople, tableofpeoplenick = {}, {} -- NO CONFIGURATION
- local thetracker, theplayer, thenotifynumber, thenotifytext -- NO CONFIGURATION
- local recuptime = timebetweeneverytrack -- NO CONFIGURATION
- if CLIENT then
- hook.Add("OnPlayerChat", "thetrackcommand", function( pl, text )
- if string.sub(text, 1, 6) == "/track" and table.HasValue(teamscantrackplayers, team.GetName(pl:Team())) then
- if CurTime() > timebetweeneverytrack then
- tableofpeople = {}
- tableofpeoplenick = {}
- for _, ply in pairs(player.GetAll()) do
- table.insert(tableofpeople, ply)
- table.insert(tableofpeoplenick, string.lower(ply:Nick()))
- end
- if table.HasValue(tableofpeoplenick, string.lower(string.sub(text, 8))) then
- local goodkey = table.KeyFromValue(tableofpeoplenick, string.lower(string.sub(text, 8)))
- victim = tableofpeople[goodkey]
- theplayer = pl
- timebetweeneverytrack = CurTime() + recuptime
- net.Start("NotifyThePlayer")
- net.WriteUInt(0, 1)
- net.WriteString("You've successfully created a track !")
- net.SendToServer()
- else
- net.Start("NotifyThePlayer")
- net.WriteUInt(1, 1)
- net.WriteString("The name you say is incorrect !")
- net.SendToServer()
- end
- return true
- elseif CurTime() < timebetweeneverytrack then
- net.Start("NotifyThePlayer")
- net.WriteUInt(1, 1)
- net.WriteString("You can't create a track because you must wait for a new!")
- net.SendToServer()
- return true
- end
- elseif string.sub(text, 1, 6) == "/track" and not table.HasValue(teamscantrackplayers, team.GetName(pl:Team())) then
- net.Start("NotifyThePlayer")
- net.WriteUInt(1, 1)
- net.WriteString("You can't create a track because you aren't in a good job!")
- net.SendToServer()
- return true
- end
- end)
- hook.Add( "HUDPaint", "showtheinformations", function()
- if !IsValid(theplayer) or !IsValid(victim) then return end
- if LocalPlayer() == theplayer then
- local dist = math.floor(theplayer:GetPos():Distance( victim:GetPos() ) / 25)
- local spos = Vector(victim:GetPos().x, victim:GetPos().y, victim:GetPos().z):ToScreen()
- draw.DrawText( victim:Nick().." - " .. dist .. " m", "Trebuchet24", spos.x - 35, spos.y - 20, Color( 255, 0, 0, 255 ), TEXT_ALIGN_CENTER )
- timer.Simple(timeoftrackhud, function()
- theplayer = nil
- victim = nil
- end)
- end
- end )
- else
- util.AddNetworkString("NotifyThePlayer")
- net.Receive("NotifyThePlayer", function( len, ply )
- thenotifynumber = net.ReadUInt(1)
- thenotifytext = net.ReadString()
- DarkRP.notify(ply, thenotifynumber, 4, thenotifytext)
- end )
- end
- -- [[ Health Regeneration Script ]] --
- if SERVER then
- local healthreg_numberofhp = 5 -- Number of HPs you win
- local healthreg_speed = 1 -- 1 HP every X second(s)
- local healthreg_delay = 5 -- Delay after that the regen begins
- local teamsforhealthreg = { -- Put the name (not TEAM_ variable) of jobs who will be generated
- "Deadpool"
- }
- local function HealthRegen()
- local time = FrameTime()
- for _, ply in pairs(player.GetAll()) do
- if table.HasValue(teamsforhealthreg, team.GetName(ply:Team())) and ply:Alive() then
- local health = ply:Health()
- ply.HealthRegen = ( ply.HealthRegen or 0 ) + time
- if ( ply.HealthRegen >= healthreg_speed ) then
- ply.HealthRegen = 0
- if ( health < 100 || healthreg_speed < 0 ) then
- ply:SetHealth( health + healthreg_numberofhp )
- end
- end
- ply.LastHealth = ply:Health()
- end
- end
- end
- hook.Add( "Think", "HealthRegeneration", HealthRegen )
- end
- -- ALL SCRIPTS ARE NOT UNDER COPYRIGHT BUT PLEASE DON'T GIVE THIS ADDON FOR OTHER PEOPLE.
- -- BY DIABLOS. JUNE 2016.
- -- THANKS FOR COOPERATION / KINDNESS.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement