• Darkrp prisoners can escape
    13 replies, posted
Darkrp prisoners can escape How I can to do When I get out from the police deperament when am I prisoner I will not be prisoner anymore. Some one can help me? and I have Mad Charge and the doors didnt respawn... Sorry about my bad english. I have Darkrp 2.4.3 weapon_mad_charge Shared.lua [CODE] // Variables that are used on both client and server SWEP.Base = "weapon_mad_base" SWEP.ViewModelFlip = false SWEP.ViewModel = "models/weapons/v_slam.mdl" SWEP.WorldModel = "models/weapons/w_slam.mdl" SWEP.HoldType = "slam" SWEP.Spawnable = true SWEP.AdminSpawnable = false SWEP.Primary.Sound = Sound("") SWEP.Primary.Recoil = 0 SWEP.Primary.Damage = 0 SWEP.Primary.NumShots = 1 SWEP.Primary.Cone = 0.075 SWEP.Primary.Delay = 5 SWEP.Primary.ClipSize = -1 // Size of a clip SWEP.Primary.DefaultClip = 1 // Default number of bullets in a clip SWEP.Primary.Automatic = false // Automatic/Semi Auto SWEP.Primary.Ammo = "Thumper" SWEP.Secondary.ClipSize = -1 // Size of a clip SWEP.Secondary.DefaultClip = -1 // Default number of bullets in a clip SWEP.Secondary.Automatic = false // Automatic/Semi Auto SWEP.Secondary.Ammo = "none" SWEP.ShellEffect = "none" // "effect_mad_shell_pistol" or "effect_mad_shell_rifle" or "effect_mad_shell_shotgun" SWEP.ShellDelay = 0 SWEP.Pistol = true SWEP.Rifle = false SWEP.Shotgun = false SWEP.Sniper = false SWEP.RunArmOffset = Vector (-0.5928, 0, 6.3399) SWEP.RunArmAngle = Vector (-19.4462, -2.5193, 0) /*--------------------------------------------------------- Name: SWEP:Precache() Desc: Use this function to precache stuff. ---------------------------------------------------------*/ function SWEP:Precache() util.PrecacheSound("weapons/c4/c4_disarm.wav") util.PrecacheSound("weapons/c4/c4_explode1.wav") util.PrecacheSound("weapons/c4/c4_click.wav") util.PrecacheSound("weapons/c4/c4_plant.wav") util.PrecacheSound("weapons/c4/c4_beep1.wav") end /*--------------------------------------------------------- Name: SWEP:PrimaryAttack() Desc: +attack1 has been pressed. ---------------------------------------------------------*/ function SWEP:PrimaryAttack() // Holst/Deploy your fucking weapon if (not self.Owner:IsNPC() and self.Owner:KeyDown(IN_USE)) then bHolsted = !self.Weapon:GetDTBool(0) self:SetHolsted(bHolsted) self.Weapon:SetNextPrimaryFire(CurTime() + 0.3) self.Weapon:SetNextSecondaryFire(CurTime() + 0.3) self:SetIronsights(false) return end /* if self.Weapon:GetNWBool("Planted") then self.Weapon:SendWeaponAnim(ACT_SLAM_DETONATOR_DETONATE) self.Weapon:EmitSound("Streetwar.d3_c17_10b_mine_mode") for k, ent in pairs(ents.GetAll()) do if ent:GetClass() == "ent_mad_charge" and ent.Owner == self.Owner then timer.Simple(1, function() ent:Explosion() ent:Remove() end) self.Weapon:SendWeaponAnim(ACT_SLAM_DETONATOR_DETONATE) end end self.Weapon:SetNextPrimaryFire(CurTime() + 2) self.Weapon:SetNextSecondaryFire(CurTime() + 2) self.Weapon:SetNWBool("Planted", false) timer.Simple(0.5, function() self.Weapon:SendWeaponAnim(ACT_SLAM_DETONATOR_HOLSTER) end) timer.Simple(1, function() if self.Owner:GetAmmoCount(self.Primary.Ammo) > 0 then self:Deploy() else self.Weapon:Remove() self.Owner:ConCommand("lastinv") end end) return end */ if (not self:CanPrimaryAttack()) then return end local tr = {} tr.start = self.Owner:GetShootPos() tr.endpos = self.Owner:GetShootPos() + 100 * self.Owner:GetAimVector() tr.filter = {self.Owner} local trace = util.TraceLine(tr) self.Weapon:SetNextPrimaryFire(CurTime() + 0.5) self.Weapon:SetNextSecondaryFire(CurTime() + 0.5) if not trace.Hit or trace.Entity:GetClass() ~= "prop_door_rotating" or trace.HitWorld then if (SERVER) then self.Owner:PrintMessage(HUD_PRINTTALK, "Explosive charge can only be installed on doors!") end return end self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay) self.Weapon:SetNextSecondaryFire(CurTime() + self.Primary.Delay) self.Weapon:SendWeaponAnim(ACT_SLAM_TRIPMINE_ATTACH) timer.Simple(0.5, function() if (not self.Owner:Alive() or self.Weapon:GetOwner():GetActiveWeapon():GetClass() ~= "weapon_mad_charge" or not IsFirstTimePredicted()) then return end self.Weapon:SendWeaponAnim(ACT_SLAM_TRIPMINE_ATTACH2) local tr = {} tr.start = self.Owner:GetShootPos() tr.endpos = self.Owner:GetShootPos() + 100 * self.Owner:GetAimVector() tr.filter = {self.Owner} local trace = util.TraceLine(tr) if not trace.Hit or trace.Entity:GetClass() ~= "prop_door_rotating" or trace.HitWorld then timer.Simple(0.6, function() if self.Owner:GetAmmoCount(self.Primary.Ammo) > 0 then self:Deploy() else self.Weapon:Remove() self.Owner:ConCommand("lastinv") end end) return end self.Owner:SetAnimation(PLAYER_ATTACK1) self:TakePrimaryAmmo(1) if (CLIENT) then return end Charge = ents.Create("ent_mad_charge") Charge:SetPos(trace.HitPos + trace.HitNormal) trace.HitNormal.z = -trace.HitNormal.z Charge:SetAngles(trace.HitNormal:Angle() - Angle(270, 180, 180)) Charge.Owner = self.Owner Charge:Spawn() if trace.Entity and trace.Entity:IsValid() and trace.Entity:GetClass() == "prop_door_rotating" then if not trace.Entity:IsNPC() and not trace.Entity:IsPlayer() and trace.Entity:GetPhysicsObject():IsValid() then constraint.Weld(Charge, trace.Entity) end else Charge:SetMoveType(MOVETYPE_NONE) end timer.Simple(0.6, function() if (not self.Owner:Alive() or self.Weapon:GetOwner():GetActiveWeapon():GetClass() ~= "weapon_mad_charge") or not IsFirstTimePredicted() then return end // self.Weapon:SetNWBool("Planted", true) self:Deploy() end) end) end /*--------------------------------------------------------- Name: SWEP:SecondaryAttack() Desc: +attack2 has been pressed. ---------------------------------------------------------*/ function SWEP:SecondaryAttack() end /*--------------------------------------------------------- Name: SWEP:CanPrimaryAttack() Desc: Helper function for checking for no ammo. ---------------------------------------------------------*/ function SWEP:CanPrimaryAttack() if (self.Owner:GetAmmoCount(self.Primary.Ammo) <= 0) or (self.Owner:WaterLevel() > 2) then self.Weapon:SetNextPrimaryFire(CurTime() + 0.5) return false end if (not self.Owner:IsNPC()) and (self.Owner:KeyDown(IN_SPEED)) then self.Weapon:SetNextPrimaryFire(CurTime() + 0.5) return false end return true end /*--------------------------------------------------------- Name: SWEP:Deploy() Desc: Whip it out. ---------------------------------------------------------*/ function SWEP:Deploy() // if self.Weapon:GetNWBool("Planted") then // self.Weapon:SendWeaponAnim(ACT_SLAM_DETONATOR_DRAW) // else self.Weapon:SendWeaponAnim(ACT_SLAM_TRIPMINE_DRAW) // end self.Weapon:SetNextPrimaryFire(CurTime() + self.DeployDelay) self.Weapon:SetNextSecondaryFire(CurTime() + self.DeployDelay) self.ActionDelay = (CurTime() + self.DeployDelay) return true end /*--------------------------------------------------------- Name: SWEP:Holster() ---------------------------------------------------------*/ function SWEP:Holster() if (CLIENT) and self.Ghost:IsValid() then self.Ghost:SetColor(255, 255, 255, 0) end return true end /*--------------------------------------------------------- Name: SWEP:OnRemove() Desc: Called just before entity is deleted. ---------------------------------------------------------*/ function SWEP:OnRemove() if (CLIENT) and self.Ghost:IsValid() then self.Ghost:SetColor(255, 255, 255, 0) end return true end [/CODE] cl_init.lua [CODE] include('shared.lua') SWEP.PrintName = "EXPLOSIVE CHARGE" // 'Nice' Weapon name (Shown on HUD) SWEP.Slot = 4 // Slot in the weapon selection m
Bump...
Bump
You already posted it in here: [url]http://facepunch.com/showthread.php?t=1249475&p=44189195&viewfull=1#post44189195[/url] Where it's supposed to be; please let this thread go!
[QUOTE=Acecool;44192858]You already posted it in here: [url]http://facepunch.com/showthread.php?t=1249475&p=44189195&viewfull=1#post44189195[/url] Where it's supposed to be; please let this thread go![/QUOTE] He didnt answer to me... Do you can help me with that?
BUMP
BUMP
When a person gets jailed, save their jail position as a variable attached to them, then do checks if they are specific distance from that spot, if yes then unjail. Nothing hard there.
[QUOTE=Newjorciks;44202940]When a person gets jailed, save their jail position as a variable attached to them, then do checks if they are specific distance from that spot, if yes then unjail. Nothing hard there.[/QUOTE] Thank you, But I am not a coder... You can do a function to me?
[QUOTE=hanm13;44203558]Thank you, But I am not a coder... You can do a function to me?[/QUOTE] This forum isn't the place for people to do anything you want. We will help you but you have to put in effort. If you want it done for you and you are willing to pay, try [url]http://coderhire.com/[/url] In the mean top please stop spamming bump unless you have something else to say or new information.
[QUOTE=Pandaman09;44203605]This forum isn't the place for people to do anything you want. We will help you but you have to put in effort. If you want it done for you and you are willing to pay, try [url]http://coderhire.com/[/url] In the mean top please stop spamming bump unless you have something else to say or new information.[/QUOTE] This forum is free! I dont need to pay! I bought some items from CoderHire I dont have more money to spend!
[QUOTE=hanm13;44203774]This forum is free! I dont need to pay! [/QUOTE] You are right, the forum is free. But for the script you request, you should try [url]www.coderhire.com[/url] because noone is ready to help you, facepunch doesn't like spammers and bumpers..
On top of that; you've been given a system that works where you only need to find coordinates by typing getpos in console. The bottom corner of a cube, and the farthest corner from the first corner which would be up to the top and 2 sides away. I showed a visual aide when you couldn't figure it out which portrayed 10 cubes, 9 which shared the same z for the bottom and the same z for the top, and the top cube which shared the same z which the 9 had for their top, and a new z for its' top. There's nothing more we can show you to make the code work; a user was kind enough to code the entire thing for you and several users were kind enough to show you how to get the positions yet you continue to bump this topic without actually listening to what everyone is saying. If you can't find the coordinates and put them in the script then you will need to pay someone to install it for you, and for that you'll need money. Here's another visual aide to show where you "getpos" the corners: [lua]This corner O________________________ / _____________________ /| / / ___________________/ / | / / /| | / / | / / / | | / / . | / / /| | | / / /| | / / / | | | / / / | | / / / | | | / / /| | | / /_/__________________/ / / | | | /________________________/ / | | | | ______________________ | | | | | | | | | | |_________| | |__| | | | | | | |___________| | |____| | | | | / / ___________| | |_ / / | | | / / / | | |/ / / | | | / / / | | | / / | | |/ / / | | |/ / | | | / / | | ' / | | |/_/_______________| | / | |____________________| | / |________________________O/ And this corner Thanks to: [url]http://www.retrojunkie.com/asciiart/shapes/cubes.htm[/url][/lua] [url]http://facepunch.com/showthread.php?t=1249475&p=44182301&viewfull=1#post44182301[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44182567&viewfull=1#post44182567[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44182852&viewfull=1#post44182852[/url] -- The DarkRP Dev is even going to add something to make what you want to do easier! [url]http://facepunch.com/showthread.php?t=1249475&p=44182948&viewfull=1#post44182948[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44189195&viewfull=1#post44189195[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44189528&viewfull=1#post44189528[/url] -- DarkRP Dev opened a request / issue [url]http://facepunch.com/showthread.php?t=1249475&p=44201849&viewfull=1#post44201849[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44201901&viewfull=1#post44201901[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44202456&viewfull=1#post44202456[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44203674&viewfull=1#post44203674[/url] -- He even posted a zip file: [url]https://braxnet.org/temp/unarrest.zip[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44204071&viewfull=1#post44204071[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44204200&viewfull=1#post44204200[/url] -- DarkRP Dev added setjailpos and addjailpos to functionality [url]http://facepunch.com/showthread.php?t=1249475&p=44204647&viewfull=1#post44204647[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44204677&viewfull=1#post44204677[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44205403&viewfull=1#post44205403[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44206681&viewfull=1#post44206681[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44206920&viewfull=1#post44206920[/url] -- visuals explaining what the non -- posts are explaining
[QUOTE=Acecool;44211553]On top of that; you've been given a system that works where you only need to find coordinates by typing getpos in console. The bottom corner of a cube, and the farthest corner from the first corner which would be up to the top and 2 sides away. I showed a visual aide when you couldn't figure it out which portrayed 10 cubes, 9 which shared the same z for the bottom and the same z for the top, and the top cube which shared the same z which the 9 had for their top, and a new z for its' top. There's nothing more we can show you to make the code work; a user was kind enough to code the entire thing for you and several users were kind enough to show you how to get the positions yet you continue to bump this topic without actually listening to what everyone is saying. If you can't find the coordinates and put them in the script then you will need to pay someone to install it for you, and for that you'll need money. Here's another visual aide to show where you "getpos" the corners: [lua]This corner O________________________ / _____________________ /| / / ___________________/ / | / / /| | / / | / / / | | / / . | / / /| | | / / /| | / / / | | | / / / | | / / / | | | / / /| | | / /_/__________________/ / / | | | /________________________/ / | | | | ______________________ | | | | | | | | | | |_________| | |__| | | | | | | |___________| | |____| | | | | / / ___________| | |_ / / | | | / / / | | |/ / / | | | / / / | | | / / | | |/ / / | | |/ / | | | / / | | ' / | | |/_/_______________| | / | |____________________| | / |________________________O/ And this corner Thanks to: [url]http://www.retrojunkie.com/asciiart/shapes/cubes.htm[/url][/lua] [url]http://facepunch.com/showthread.php?t=1249475&p=44182301&viewfull=1#post44182301[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44182567&viewfull=1#post44182567[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44182852&viewfull=1#post44182852[/url] -- The DarkRP Dev is even going to add something to make what you want to do easier! [url]http://facepunch.com/showthread.php?t=1249475&p=44182948&viewfull=1#post44182948[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44189195&viewfull=1#post44189195[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44189528&viewfull=1#post44189528[/url] -- DarkRP Dev opened a request / issue [url]http://facepunch.com/showthread.php?t=1249475&p=44201849&viewfull=1#post44201849[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44201901&viewfull=1#post44201901[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44202456&viewfull=1#post44202456[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44203674&viewfull=1#post44203674[/url] -- He even posted a zip file: [url]https://braxnet.org/temp/unarrest.zip[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44204071&viewfull=1#post44204071[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44204200&viewfull=1#post44204200[/url] -- DarkRP Dev added setjailpos and addjailpos to functionality [url]http://facepunch.com/showthread.php?t=1249475&p=44204647&viewfull=1#post44204647[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44204677&viewfull=1#post44204677[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44205403&viewfull=1#post44205403[/url] -- [url]http://facepunch.com/showthread.php?t=1249475&p=44206681&viewfull=1#post44206681[/url] [url]http://facepunch.com/showthread.php?t=1249475&p=44206920&viewfull=1#post44206920[/url] -- visuals explaining what the non -- posts are explaining[/QUOTE] I got this error [ERROR] lua/autorun/jailbreak.lua:8: attempt to call field 'Create' (a nil value) 1. fn - lua/autorun/jailbreak.lua:8 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183 -- hook.Add("InitPostEntity", "BraxHookJailbreak", function() -- Position for the escape trigger local UnarrestMin = Vector(-2399.97, 357.97, -95.97) local UnarrestMax = Vector(-2179.03, 222.03, -95.97) local ent = ents.Create("unarrest") ent:SetPos( UnarrestMin ) ent.posMin = UnarrestMin ent.posMax = UnarrestMax ent:Spawn() ent:Activate() end)
Sorry, you need to Log In to post a reply to this thread.