• Zip Ties, Anarchy RP
    5 replies, posted
I own a server, anarchy RP, Its similar to Kuro's Experiment, but im yet to find out how to make zipties, All i want them to do is make there use key not work, and so it sets there running spead rather slow, Now. to the function itself. I want it, so when i use the swep on them, use Draw.Text on there screen, saying ' You are tied up! ' and there movement is slowed, and they cant use the use key, To untie them, right click with the swep while pointing at them, Thanks everyone!
How about asking instead of just saying, "I want this," or "I want that," all the fucking time? Then maybe somebody might help you. If that's too hard for you then go and make them yourself.
Actually, I know how to make it, I just always break something in the process, Quit flaming on my post's because you and your 'hostell' roleplaying community sucks, I'll bet you I'm better at Lua than you, Considering 'hostell' (why the fuck did you spell it like that, learn English) Asked /me/ to script for them, and yeah, they stole my weapon checking SWEP. Ill probably get banned for flaming, but i think it was needed on my part, I /always/ say Thank you to the people who help me out, As i /do/ feel Grateful..
Here use this if you can it's helpful at least. [lua] if ( LocalPlayer().Tied ) then draw.DrawText( "Tied up", "TargetID", ScrW( ) / 2 - 93, 6, Color( 255, 255, 255, 255 ) ) end [/lua] [lua] function GM:Tick() for _, ply in pairs( player.GetAll() ) do if ( ply.Tied ) then ply:SetWalkSpeed( 100 ) ply:SetRunSpeed( 0 ) else ply:SetWalkSpeed( Config[ "WalkSpeed" ] ) ply:SetRunSpeed( Config[ "RunSpeed" ] ) end end end [/lua] [lua] usermessage.Hook( "SendTied", function( um ) LocalPlayer().Tied = um:ReadBool() end ) [/lua] this if to disable a function if they are dead or tied up. [lua] if ( ply.Tied or !ply:Alive() ) then return end [/lua] [lua] -- Set a players tied status. function PMeta:SetTied( tied ) self.Tied = tied umsg.Start( "SendTied", self ) umsg.Bool( tied ) umsg.End() end PMeta = nil [/lua] -- The swep [lua] if SERVER then AddCSLuaFile( "shared.lua" ) end if CLIENT then SWEP.Slot = 3 SWEP.SlotPos = 2 SWEP.IconLetter = "w" end SWEP.Base = "weapon_cgrp_base" SWEP.Category = "RP" SWEP.PrintName = "ZipTies" SWEP.Author = "Chewgum" SWEP.Instructions = "Left click to tie a player.\nRight click to untie a player." SWEP.Spawnable = false SWEP.AdminSpawnable = true SWEP.ViewModel = "models/weapons/v_fists.mdl" SWEP.WorldModel = "models/weapons/w_fists.mdl" SWEP.ViewModelFOV = 62 SWEP.ViewModelFlip = false SWEP.Primary.ClipSize = - 1 SWEP.Primary.Delay = 1 SWEP.Primary.DefaultClip = 0 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "" SWEP.Secondary.ClipSize = - 1 SWEP.Secondary.DefaultClip = 0 SWEP.Secondary.Automatic = true SWEP.Secondary.Ammo = "" function SWEP:Initialize() if( SERVER ) then self:SetWeaponHoldType( "normal" ) end end function SWEP:Deploy() if( SERVER ) then self.Owner:DrawViewModel( false ) self.Owner:DrawWorldModel( false ) end end function SWEP:PrimaryAttack() if ( CurTime() < self.Primary.Delay ) then return end self.Primary.Delay = CurTime() + 1 local trace = { } trace.start = self.Owner:EyePos() trace.endpos = trace.start + self.Owner:GetAimVector() * 80 trace.filter = self.Owner local tr = util.TraceLine( trace ) if( tr.Hit or tr.Entity:IsValid() ) then if( SERVER ) then if( tr.Entity:IsValid() ) then if( tr.Entity:IsPlayer() ) then tr.Entity:SetTied( true ) self.Owner:PrintChat( "Tied target.", false ) end end end end end function SWEP:SecondaryAttack() self.Weapon:SetNextSecondaryFire( CurTime() + 1 ) local tr = self.Owner:GetEyeTrace() if ( SERVER ) then if ( self.Owner:GetShootPos():Distance( tr.HitPos ) <= 54 ) then if( tr.Entity:IsValid() and tr.Entity:IsPlayer() ) then tr.Entity:SetTied( false ) self.Owner:PrintChat( "Untied target.", false ) end end end end [/lua]
Wow, Yahan.. Once again, You have greatly impressed me, /again/ Anyway, Thanks, for taking the time to actually do this, thanks. Really appreciate it mate.
[QUOTE=schumacher;17152145]Actually, I know how to make it, I just always break something in the process, Quit flaming on my post's because you and your 'hostell' roleplaying community sucks, I'll bet you I'm better at Lua than you, Considering 'hostell' (why the fuck did you spell it like that, learn English) Asked /me/ to script for them, and yeah, they stole my weapon checking SWEP. Ill probably get banned for flaming, but i think it was needed on my part, I /always/ say Thank you to the people who help me out, As i /do/ feel Grateful..[/QUOTE] It's actually Hòstell in full, and it's a random word, doesn't mean anything. Why does it need to mean anything, it's the name of our community. And I'm pretty sure you were only coding because I had left previous to that, and came back around the time of you guys leaving from our server. And it is not your weapon checking swep, shut the fuck up.
Sorry, you need to Log In to post a reply to this thread.