Credits alexip121093 hihi1210 Descriptions
You can spawn an intelligent machine gun ( mini gun), the gun is automatically controlled, you can not use it to shot, but you can carry it on your back or put it down, when you put it down , the gun try to find the enemy and fire automatically .
Health: If a gun's health go zero, it will go to sleep.
Sleep: If a gun not attack a enemy for a long time , it go to sleep.
Wake up: Survivor can wake up a gun by shoving it. Infected can wake up a gun by attacking it.
Team: The gun belong to a team , If it is survivor team, it will attack infected, if it is infected team, it will attack survivors.
Betray to infected team : If a gun being attcked, it will betray to infected.
Betray to survivor team : If a gun being shoved by survivor, it will betray to survivor.
Ammo: you can refill a gun's ammo by using a ammo stack when carry it.
Video: http://v.youku.com/v_show/id_XMjk0NDIyNzI0.html
How to use (default key): !machine , !machine 0 !machine 1, : spawn a machine gun with different type. !removemachine : remove a machine gun. duck+mouse right button : carry the gun on your back . use button : put the gun down.
Convars:
"l4d_machine_enable", "2", " 0:disable, 1:enable in coop mode, 2: enable in all mode "
"l4d_machine_damage_to_infected", "25.0", "bullet damage"
"l4d_machine_damage_to_survivor", "2.0", "bullet damage"
"l4d_machine_maxuser", "5", "maximum count of machine gun"
"l4d_machine_range", "1000.0", "maxmum scan range of machine gun"
"l4d_machine_voerheat", "10.0", " how many seconds did the gun overheat."
"l4d_machine_adminonly", "0", "1:admin use only"
"l4d_machine_msg", "1", "how many times to display usage information , 0 disable "
"l4d_machine_ammo_count", "1000", "ammo count"
"l4d_machine_ammo_refill", "1", "0:disable, 1:enable"
"l4d_machine_allow_carry", "1", "0:disable carray 1:every one, 2: only gun's creator, l4d1 should set to 2 otherwise will crash"
"l4d_machine_sleep_time", "300", ""how many seconds does a gun goto sleep while no enemy, must >0"
"l4d_machine_fire_rate", "20", "rate of fire, how many shot per soncods [5, 30]"
"l4d_machine_health", "100.0", "gun's health"
Just like my movable machine gun plugin that you can carry the gun
Anyway good plugin , another plugin using the info_particle_target
Here are some ideas.
Add a cvar to control the attack range and the angle of detection. Also add sone ammo types eg. Fire , explosive , heal , freeze,knockback
Just like my movable machine gun plugin that you can carry the gun
Anyway good plugin , another plugin using the info_particle_target
Here are some ideas.
Add a cvar to control the attack range and the angle of detection. Also add sone ammo types eg. Fire , explosive , heal , freeze,knockback
Thank you for your guidance.
The beginning of the idea is create a weapon auto attack inftects, the weapon is on your shoulder, like predators in movie, but I find no appropriate model to use, and my hammar tool do not work.
Attack range and damage type are written directly in code , not yet make convars.
Another question to ask, the code below do not work in l4d1, the bullet track start from pos but not end with endpos, "info_particle_target" even do not exsit.
Finally! I knew someone would make this. Just sad this was the first thing I tried to achieve with SourceMod, 2 years ago. (Left 4 Dead 1, playing as a special infected and forcing me to control it)
Hey thanks it worked realy great, but I guess I have a bug and most likely cause my server runs survival, this is the second day and nobody is able to spawn the gun, it will say too many machine when you try to spawn one, I increased the amount allowed and then was able to spawn more, but now just cant spawn any even after map change.
If you need more info about what is running on my server let me know!
BTW the tankrock plugin works great on my server, no errors or crashes hm it crashes my versus server tho
l4d_machine.sp(128 ) : warning 204: symbol is assigned a value that is never used: "button"
l4d_machine.sp(162) : warning 204: symbol is assigned a value that is never used: "bot"
l4d_machine.sp(1098 ) : warning 204: symbol is assigned a value that is never used: "hit"
l4d_machine.sp(1202) : warning 203: symbol is never used: "CheckAngle"
l4d_machine.sp(63) : warning 203: symbol is never used: "GunAngle"
l4d_machine.sp(68 ) : warning 203: symbol is never used: "LastButton"
l4d_machine.sp(68 -- 1202) : warning 203: symbol is never used: "PrintVector"
l4d_machine.sp(68 -- 1202) : warning 203: symbol is never used: "SetVectorOffest"
l4d_machine.sp(68 -- 1202) : warning 203: symbol is never used: "ShowAngle"
l4d_machine.sp(68 -- 1202) : warning 203: symbol is never used: "ShowDir"
l4d_machine.sp(68 -- 1202) : warning 203: symbol is never used: "StopClientCarry"
l4d_machine.sp(100) : warning 204: symbol is assigned a value that is never used: "g_iVelocity"
Header size: 4780 bytes
Code size: 30344 bytes
Data size: 9612 bytes
Stack/heap size: 16384 bytes; Total requirements: 61120 bytes
Thank you for your guidance.
The beginning of the idea is create a weapon auto attack inftects, the weapon is on your shoulder, like predators in movie, but I find no appropriate model to use, and my hammar tool do not work. Attachment 90525
Attack range and damage type are written directly in code , not yet make convars.
Another question to ask, the code below do not work in l4d1, the bullet track start from pos but not end with endpos, "info_particle_target" even do not exsit.
L 08/13/2011 - 19:29:19: [SM] Native "GetEntProp" reported: Property "m_nButtons" not found (entity 0/worldspawn)
L 08/13/2011 - 19:29:19: [SM] Displaying call stack trace for plugin "l4d_machine.smx":
L 08/13/2011 - 19:29:19: [SM] [0] Line 557, /home/hlds/left4dead2/left4dead2/addons/sourcemod/scripting/include/entity_prop_stocks.inc::GetClientButtons()
L 08/13/2011 - 19:29:19: [SM] [1] Line 128, l4d_machine.sp::entity_shoved()