View Single Post
Author Message
alexip121093
Senior Member
Join Date: Dec 2009
Location: Hong Kong
Old 04-10-2011 , 08:27   [L4D & L4D2] Spawn & Movable Machine Gun 1.0.6
Reply With Quote #1

Highly Recommend USE with Silvers's [L4D & L4D2] Mini Gun Spawner (1.0)
http://forums.alliedmods.net/showthread.php?t=175152


[SIZE="4"][COLOR="Red"]Notice
Now There are l4d2_movablemachinegun (1.0.3) and l4d2_movablemachinegun_sdkhooks(1.0.6)

I will not support the l4d2_movablemachinegun version anymore


About :
It works on both l4d2 + l4d1 (l4d1 not tested)

It allows you to press Keyboard Shift together with Mouse Right Click while pointing to the machine gun to move it
And also spawn the type of mini gun you like

Video : http://www.youtube.com/watch?v=ANxS0bXvCGI
Reminder :
YOU MAY CREATE MACHINE GUNS EVERYMAP USING STRIPPER http://forums.alliedmods.net/showthread.php?t=39439
example code for creating a minigun in l4d2 or l4d1 using stripper
Code:
{
"origin" "1664 564 416"
"updatechildren" "0"
"StartDisabled" "0"
"spawnflags" "0"
"solid" "6"
"SetBodyGroup" "0"
"rendermode" "0"
"renderfx" "0"
"rendercolor" "255 255 255"
"renderamt" "255"
"RandomAnimation" "0"
"pressuredelay" "0"
"PerformanceMode" "0"
"model" "models/w_models/weapons/50cal.mdl"
"MinPitch" "-25"
"MinAnimTime" "5"
"MaxYaw" "65"
"MaxPitch" "50"
"MaxAnimTime" "10"
"glowcolor" "0 0 0"
"fadescale" "1"
"fademindist" "-1"
"ExplodeRadius" "0"
"ExplodeDamage" "0"
"disablereceiveshadows" "0"
"body" "0"
"angles" "0 90 0"
"classname" "prop_minigun"
"hammerid" "593162"
}
example code for creating a l4d1 minigun in l4d2 using stripper
Code:
{
"origin" "1664 564 416"
"updatechildren" "0"
"StartDisabled" "0"
"spawnflags" "0"
"solid" "6"
"SetBodyGroup" "0"
"rendermode" "0"
"renderfx" "0"
"rendercolor" "255 255 255"
"renderamt" "255"
"RandomAnimation" "0"
"pressuredelay" "0"
"PerformanceMode" "0"
"model" "models/w_models/weapons/w_minigun.mdl"
"MinPitch" "-25"
"MinAnimTime" "5"
"MaxYaw" "65"
"MaxPitch" "50"
"MaxAnimTime" "10"
"glowcolor" "0 0 0"
"fadescale" "1"
"fademindist" "-1"
"ExplodeRadius" "0"
"ExplodeDamage" "0"
"disablereceiveshadows" "0"
"body" "0"
"angles" "0 90 0"
"classname" "prop_minigun_l4d1"
"hammerid" "593162"
}
CVAR :
config your cvar @ cfg/sourcemod/l4d2_movablemachinegun.cfg
Code:
l4d2_moveablemachinegun 1.0.6         l4d2_moveablemachinegun version
l4d2_movablemachinegun_block 0    Block The Attack button when moving a minigun  0 = do not block ,1 = block
l4d2_movablemachinegun_speed 0.8   The Walking speed when moving a minigun    1.0 = normal speed , -0.1 = do not modify
l4d2_movablemachinegun_distance 200.0 Block The Deploy of minigun within the range  (0.0 to disable)
Admin Commands:
sm_minigun <type> Create a minigun in front of you 0 is the l4d1 minigun 1 is the l4d2 minigun
sm_removeminigun remove the minigun that you aiming

To Do List:
add speed cvar control the speed moving the gun √
more buttons option ×
color cvar ×

Changelog:
1.0.6-1 fixed cvar flags
1.0.6 added distance cvar 122 views
added autoexec cfg
1.0.5 Added speed cvar to control the walking speed when you holding the machine gun 44 views
1.0.4 Added a sdkhooks version requires sdkhooks 2.0
-added a chat notice how to move the machine gun
(notice appears when a player use a minigun)
-added a cvar to block the attack button when moving a minigun
-changed onplayerruncmd to postthink
l4d2_movablemachinegun_sdkhooks start
---------------------------------------------
l4d2_movablemachinegun ends
1.0.3 fixed player can move a minigun that is using by other players
1.0.2 added the sm_minigun <type> command and sm_removeminigun
1.0.1 fixed infected can move it too and prevent player leave the game will lose a machinegun
1.0 First Release

Credits
Slivers For The parent code
antihacker for the minigun creation code
disawar1's edition(carry the minigun on your back) : http://forums.alliedmods.net/showpos...9&postcount=31
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_movablemachinegun.sp - 5171 views - 9.4 KB)
File Type: sp Get Plugin or Get Source (l4d2_movablemachinegun_sdkhooks.sp - 3366 views - 13.6 KB)
__________________

Last edited by asherkin; 05-15-2020 at 11:44.
alexip121093 is offline
Send a message via MSN to alexip121093