CapsAdmin

Untitled

Jul 17th, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.84 KB | None | 0 0
  1. GET /getinstall_003/?v=31333200&u=373635363131393739373839373730303700&scriptid=31333139383400&rev=3700&key=e5ca8ba6e55e67283a3a997fdd834a0c HTTP/1.1
  2.  
  3. Host: toyboxapi.garrysmod.com
  4.  
  5. Accept: */*
  6.  
  7.  
  8.  
  9. HTTP/1.1 200 OK
  10.  
  11. Content-Type: text/html; charset=UTF-8
  12.  
  13. Date: Tue, 17 Jul 2012 16:11:25 GMT
  14.  
  15. Server: Apache/2.2.22 (Amazon)
  16.  
  17. X-Powered-By: PHP/5.3.13
  18.  
  19. Content-Length: 10318
  20.  
  21. Connection: keep-alive
  22.  
  23.  
  24.  
  25. "script"
  26.  
  27. {
  28.  
  29. ."uid" .."weapon_131984"
  30.  
  31. ."scriptid" ."131984"
  32.  
  33. ."name" .."NyanRevolver"
  34.  
  35. ."type" .."weapon"
  36.  
  37. ."revision" ."17"  
  38.  
  39. .
  40.  
  41. ."content"
  42.  
  43. .{
  44.  
  45. .."content_53924"
  46.  
  47. ..{
  48.  
  49. ..."id" .."53924"
  50.  
  51. ..."rev".."1"
  52.  
  53. ..."name"."sound/weapons/nyan_revolver/nyancatsoundfx.wav"
  54.  
  55. ..."url".."http://toyboxcontent.s3.amazonaws.com/53924?AWSAccessKeyId=AKIAIOPONRLV2V7FJNSQ&Expires=1342541845&Signature=G0os5j4WrhDnMUEywOI1qz3K1B8%3D"
  56.  
  57. ..."size"."1348257"
  58.  
  59. ..}
  60.  
  61. .}
  62.  
  63. }
  64.  
  65. -- SWEP template
  66.  
  67. -- Version 0.2 BETA
  68.  
  69. -- All code written by Aric Blunk (mblunk)
  70.  
  71.  
  72.  
  73. -- Effect settings
  74.  
  75. SWEP.PrintName        = "NyanRevolver"    -- The name of the weapon
  76.  
  77. SWEP.Slot            = 1                    -- The weapon slot this SWEP belongs in (0-5)
  78.  
  79. SWEP.SlotPos        = 2                    -- The position in the slot this weapon belongs in (0-infinity, DO NOT COVER UP EXISTING WEAPONS)
  80.  
  81. SWEP.DrawAmmo        = true                -- Display how much ammo this weapon has left?
  82.  
  83. SWEP.DrawCrosshair    = true                -- Display the crosshair?
  84.  
  85. SWEP.ViewModel        = "models/weapons/v_357.mdl"    -- First person model
  86.  
  87. SWEP.WorldModel        = "models/weapons/w_357.mdl"    -- Third person model
  88.  
  89. SWEP.ReloadSound    = "weapons/pistol/pistol_reload1.wav"    -- What sound should this weapon make when reloaded?
  90.  
  91.  
  92.  
  93. -- Other settings
  94.  
  95. SWEP.Weight                = 10        -- How powerful is this weapon?
  96.  
  97. SWEP.AutoSwitchTo        = false        -- Automatically switch to this weapon if it's more powerful than what we're already holding
  98.  
  99. SWEP.AutoSwitchFrom        = false        -- Automatically switch from this weapon if what we pick up is more powerful than this weapon
  100.  
  101. SWEP.Spawnable            = true        -- Can clients spawn this weapon?
  102.  
  103. SWEP.AdminSpawnable        = true        -- Can admins spawn this weapon?
  104.  
  105. --SWEP.AutoReload        = true        -- Automatically reload if the clip is empty? (DOES NOT WORK YET)
  106.  
  107.  
  108.  
  109. -- Weapon info
  110.  
  111. SWEP.Author            = "David Baxter(dynamited3)"        -- Who made this
  112.  
  113. SWEP.Contact        = ""        -- How you can contact who made this
  114.  
  115. SWEP.Purpose        = "To have fun!"    -- Why was this made?
  116.  
  117. SWEP.Instructions    = ""        -- How do you use this?
  118.  
  119.  
  120.  
  121. -- Primary fire settings
  122.  
  123. SWEP.Primary.Sound            = "weapons/nyan_revolver/nyancatsoundfx.wav"    -- What sound should this weapon make when fired?
  124.  
  125. SWEP.Primary.Damage            = 10000000        -- How much damage each bullet inflicts
  126.  
  127. SWEP.Primary.NumShots        = 50            -- How many bullets we should shoot each time we fire the weapon (Use more than one for shotguns and the like)
  128.  
  129. SWEP.Primary.Recoil            = 0.5        -- How much we should punch the view
  130.  
  131. SWEP.Primary.Cone            = 2            -- How many degrees the bullets can spread (90 max)
  132.  
  133. SWEP.Primary.Delay            = 0.01        -- How many seconds between each shot
  134.  
  135. SWEP.Primary.ClipSize        = 18        -- How big the clip is
  136.  
  137. SWEP.Primary.DefaultClip    = 256        -- How much ammo the gun comes with
  138.  
  139. SWEP.Primary.Tracer            = 1            -- Fire a tracer round every so many bullets
  140.  
  141. SWEP.Primary.Force            = 1000000        -- How much force the bullets have when they hit physics objects
  142.  
  143. SWEP.Primary.TakeAmmoPerBullet = false    -- Take 1 ammo for each bullet = true, take 1 ammo for each shot = false
  144.  
  145. SWEP.Primary.Automatic        = false        -- Is this weapon automatic?
  146.  
  147. SWEP.Primary.Ammo            = "pistol"    -- Primary ammo type
  148.  
  149.  
  150.  
  151. -- Secondary fire settings
  152.  
  153. SWEP.Secondary.Sound        = ""        -- What sound should this weapon make when fired?
  154.  
  155. SWEP.Secondary.Damage        = 0            -- How much damage each bullet inflicts
  156.  
  157. SWEP.Secondary.NumShots        = 0            -- How many bullets we should shoot each time we fire the weapon (Use more than one for shotguns and the like)
  158.  
  159. SWEP.Secondary.Recoil        = 0            -- How much we should punch the view
  160.  
  161. SWEP.Secondary.Cone            = 0            -- How many degrees the bullets can spread (90 max)
  162.  
  163. SWEP.Secondary.Delay        = 0            -- How many seconds between each shot
  164.  
  165. SWEP.Secondary.ClipSize        = 0            -- How big the clip is
  166.  
  167. SWEP.Secondary.DefaultClip    = 0            -- How much ammo the gun comes with
  168.  
  169. SWEP.Secondary.Tracer        = 0            -- Fire a tracer round every so many bullets
  170.  
  171. SWEP.Secondary.Force        = 0            -- How much force the bullets have when they hit physics objects
  172.  
  173. SWEP.Secondary.TakeAmmoPerBullet = false    -- Take 1 ammo for each bullet = true, take 1 ammo for each shot = false
  174.  
  175. SWEP.Secondary.Automatic    = false        -- Is this weapon automatic?
  176.  
  177. SWEP.Secondary.Ammo            = ""        -- Secondary ammo type
  178.  
  179.  
  180.  
  181. -- Functions that we can use to run certain code at certain times
  182.  
  183. -- I don't suggest you play around with this stuff unless you know what you're doing
  184.  
  185.  
  186.  
  187. function SWEP:Initialize()            -- Called when this script is run
  188.  
  189. end
  190.  
  191.  
  192.  
  193. function SWEP:PrimaryAttack()        -- Called when we press primary fire
  194.  
  195.     if ( !self:CanPrimaryAttack() ) then return end        -- If we shouldn't be shooting, don't shoot
  196.  
  197.     local bullet = {}    -- Set up the shot
  198.  
  199.         bullet.Num = self.Primary.NumShots                -- How many bullets we'll fire at once
  200.  
  201.         bullet.Src = self.Owner:GetShootPos()            -- Where the bullets are coming from
  202.  
  203.         bullet.Dir = self.Owner:GetAimVector()            -- Where the bullets are headed
  204.  
  205.         bullet.Spread = Vector( self.Primary.Cone / 90, self.Primary.Cone / 90, 0 )    -- Bullet spread
  206.  
  207.         bullet.Tracer = self.Primary.Tracer                -- Set up tracer rounds
  208.  
  209.         bullet.Force = self.Primary.Force                -- Set the bullet's force
  210.  
  211.         bullet.Damage = self.Primary.Damage                -- Define how much damage each bullet does
  212.  
  213.         bullet.AmmoType = self.Primary.Ammo                -- Define what kind of ammo we're using
  214.  
  215.         self.Owner:FireBullets( bullet )                -- Shoot!
  216.  
  217.     self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK )    -- View model animation
  218.  
  219.     self.Owner:MuzzleFlash()                            -- Crappy muzzle light
  220.  
  221.     self.Owner:SetAnimation( PLAYER_ATTACK1 )            -- 3rd Person Animation
  222.  
  223.     self.Weapon:EmitSound("weapons/nyan_revolver/nyancatsoundfx.wav")    -- Make shooty noises
  224.  
  225.     self.Owner:ViewPunch(Angle( -self.Primary.Recoil, 0, 0 ))
  226.  
  227.     if (self.Primary.TakeAmmoPerBullet) then            -- Set up ammo loss
  228.  
  229.         self:TakePrimaryAmmo(self.Primary.NumShots)
  230.  
  231.     else
  232.  
  233.         self:TakePrimaryAmmo(1)
  234.  
  235.     end
  236.  
  237.     self:SetNextPrimaryFire( CurTime() + self.Primary.Delay )    -- Don't shoot again until the delay has expired
  238.  
  239. end
  240.  
  241.  
  242.  
  243. function SWEP:SecondaryAttack()        -- Called when we press secondary fire
  244.  
  245.     if ( !self:CanSecondaryAttack() ) then return end    -- If we shouldn't be shooting, don't shoot
  246.  
  247.     local bullet = {}    -- Set up the shot
  248.  
  249.         bullet.Num = self.Secondary.NumShots            -- How many bullets we'll fire at once
  250.  
  251.         bullet.Src = self.Owner:GetShootPos()            -- Where the bullets are coming from
  252.  
  253.         bullet.Dir = self.Owner:GetAimVector()            -- Where the bullets are headed
  254.  
  255.         bullet.Spread = Vector( self.Secondary.Cone / 90, self.Secondary.Cone / 90, 0 )    -- Bullet spread
  256.  
  257.         bullet.Tracer = self.Secondary.Tracer            -- Set up tracer rounds
  258.  
  259.         bullet.Force = self.Secondary.Force                -- Set the bullet's force
  260.  
  261.         bullet.Damage = self.Secondary.Damage            -- Define how much damage each bullet does
  262.  
  263.         bullet.AmmoType = self.Secondary.Ammo            -- Define what kind of ammo we're using
  264.  
  265.         self.Owner:FireBullets( bullet )                -- Shoot!
  266.  
  267.     self.Weapon:SendWeaponAnim( ACT_VM_SECONDARYATTACK )    -- View model animation
  268.  
  269.     self.Owner:MuzzleFlash()                            -- Crappy muzzle light
  270.  
  271.     self.Owner:SetAnimation( PLAYER_ATTACK2 )            -- 3rd Person Animation
  272.  
  273.     self.Weapon:EmitSound(Sound(self.Secondary.Sound))    -- Make shooty noises
  274.  
  275.     self.Owner:ViewPunch(Angle( -self.Secondary.Recoil, 0, 0 ))
  276.  
  277.     if (self.Secondary.TakeAmmoPerBullet) then            -- Set up ammo loss
  278.  
  279.         self:TakeSecondaryAmmo(self.Secondary.NumShots)
  280.  
  281.     else
  282.  
  283.         self:TakeSecondaryAmmo(1)
  284.  
  285.     end
  286.  
  287.     self:SetNextSecondaryFire( CurTime() + self.Secondary.Delay )    -- Don't shoot again until the delay has expired
  288.  
  289. end
  290.  
  291.  
  292.  
  293. function SWEP:Think()                -- Called every frame while this weapon is active
  294.  
  295. --[[ autoreload code (doesn't work, help?)
  296.  
  297.     if ( self.AutoReload ) and (( self.LastReload == nil ) or ( CurTime() > (self.LastReload + 1) )) then
  298.  
  299.     SWEP.LastReload = CurTime()
  300.  
  301.         if (self:Ammo1() > 0) and (self:Clip1() == 0) and (!self.Weapon:DefaultReload()) then
  302.  
  303.             self.Weapon:DefaultReload( ACT_VM_RELOAD )
  304.  
  305.             --self:Reload()
  306.  
  307.         end
  308.  
  309.         if (self:Ammo2() > 0) and (self:Clip2() == 0) and (!self.Weapon:DefaultReload()) then
  310.  
  311.             self.Weapon:DefaultReload( ACT_VM_RELOAD )
  312.  
  313.             --self:Reload()
  314.  
  315.         end
  316.  
  317.     end
  318.  
  319.     ]]
  320.  
  321. end
  322.  
  323.  
  324.  
  325. function SWEP:Reload()                -- Called when we reload
  326.  
  327.     if (self.Weapon:DefaultReload()) then return end    -- If we're already reloading, don't try to reload
  328.  
  329.     self.Weapon:DefaultReload( ACT_VM_RELOAD )        -- Reload
  330.  
  331.     self.Weapon:EmitSound(Sound(self.ReloadSound))    -- Make reloady noises
  332.  
  333. end
  334.  
  335.  
  336.  
  337. function SWEP:Deploy()                -- Called when we take this weapon out
  338.  
  339.     self.Weapon:SendWeaponAnim(ACT_VM_DRAW)
  340.  
  341.     return true
  342.  
  343. end
  344.  
  345.  
  346.  
  347. function SWEP:Holster()                -- Called when we put this weapon away
  348.  
  349.     return true
  350.  
  351. end
  352.  
  353.  
  354.  
  355. function SWEP:OnRemove()            -- Called right before this gun exists no more
  356.  
  357. end
  358.  
  359.  
  360.  
  361. function SWEP:OnRestore()            -- Called when we load a save where you have this weapon, or if the admin changes the map
  362.  
  363. end
  364.  
  365.  
  366.  
  367. function SWEP:Precache()            -- Use this function to precache resources
  368.  
  369. end
  370.  
  371.  
  372.  
  373. function SWEP:OwnerChanged()        -- Called when this weapons is dropped or someone else picks it up
  374.  
  375. end
  376.  
  377.  
  378.  
  379. function SWEP:ContextScreenClick( aimvec, mousecode, pressed, ply )    -- Use this function to define what happens when the user clicks with the context screen cursor
  380.  
  381. end
Advertisement
Add Comment
Please, Sign In to add comment