AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Mini Gun Spawner (1.9) [11-Dec-2022] (https://forums.alliedmods.net/showthread.php?t=175152)

Silvers 12-30-2011 22:02

[L4D & L4D2] Mini Gun Spawner (1.9) [11-Dec-2022]
 
9 Attachment(s)
  • Save and auto-spawn the mini guns: .50 Calibre or L4D1 Mini Gun.
  • Highly Recommend using with alexip121093's "Spawn & Movable Machine Gun": http://forums.alliedmods.net/showthread.php?t=154557
  • The auto-spawn data config is saved to l4d_mini_gun.cfg in your servers \addons\sourcemod\data\ folder.



Related Plugins:


Thanks:


Admin Commands: (requires "z" flag)
PHP Code:

sm_mg        // Spawns a temporary Mini Gun at your crosshair. Usage: sm_mg <0|1> (0=.50 Cal / 1=Minigun).
sm_mgsave    // Spawns a Mini Gun at your crosshair and saves to config. Usage: sm_mg <0|1> (0=.50 Cal / 1=Minigun).
sm_mglist    // Displays a list of Mini Guns spawned by the plugin and their locations.
sm_mgdel     // Removes the Mini Gun you are nearest to and deletes from the config if saved.
sm_mgclear   // Removes all Mini Guns from the current map.
sm_mgwipe    // Removes all Mini Guns from the current map and deletes them from the config. 



CVars:

Saved to l4d_mini_gun.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d_mini_gun_allow "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_mini_gun_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_mini_gun_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_mini_gun_modes_tog "0"

// -1=All, 0=Off, other value randomly spawns that many from the config.
l4d_mini_gun_random "2"

// Mini Gun plugin version.
l4d_mini_gun_version 



Changes:
Code:

1.9 (11-Dec-2022)
    - Various changes to tidy up code.

1.8 (10-May-2020)
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.

1.7 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.

1.6 (05-May-2018)
    - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    - Changed cvar "l4d_mini_gun_modes_tog" now supports L4D1.
    - Removed unused particle which showed a single error line in L4D1.

1.5 (21-Jul-2013)
    - Removed Sort_Random work-around. This was fixed in SourceMod 1.4.7, all should update or spawning issues will occur.

1.4 (23-Jun-2012)
    - Fixed a stupid mistake which created entities and never deleted them.

1.3 (10-May-2012)
    - Added cvar "l4d_mini_gun_modes_off" to control which game modes the plugin works in.
    - Added cvar "l4d_mini_gun_modes_tog" same as above, but only works for L4D2.

1.2 (14-Jan-2012)
    - Increased the max number of spawns to 48.

1.1 (31-Dec-2011)
    - Removed useless code.

1.0 (31-Dec-2011)
    - Initial release.



Installation:
  • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

Updating from 1.2 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

SyluxLockjaw100 12-31-2011 01:13

Re: [L4D & L4D2] Mini Gun Spawner (1.0) [31-Dec-2011]
 
Wow nice! Finally no more building them in Stipper,thanks alot of this.

disawar1 12-31-2011 17:06

Re: [L4D & L4D2] Mini Gun Spawner (1.1) [31-Dec-2011]
 
oh dear my flowers ^ ^ )

chatyak 01-30-2012 01:27

Re: [L4D & L4D2] Mini Gun Spawner (1.2) [14-Jan-2011]
 
Where does it spawn these or how does it work exactly? I haven't found a plugin that will give survivors a mini gun that they can carry around and use.

Silvers 01-30-2012 02:21

Re: [L4D & L4D2] Mini Gun Spawner (1.2) [14-Jan-2011]
 
You save it to the map using the commands.

Spawn & Movable Machine Gun: http://forums.alliedmods.net/showthread.php?t=154557

chatyak 01-30-2012 14:43

Re: [L4D & L4D2] Mini Gun Spawner (1.2) [14-Jan-2011]
 
Quote:

Originally Posted by Silvers (Post 1640920)
You save it to the map using the commands.

Spawn & Movable Machine Gun: http://forums.alliedmods.net/showthread.php?t=154557

Hello Silvers,

Would this be correct then?

1) Download / install plugin.

2) While playing map - type sm_mgsave and it will place a mini gun on the map AND save it there for future (on server)?

3) If download/install alexips plugin - then I can walk up to minigun and shift+right click to move it?


Could you do a youtube video to show a tutorial? I'm confused about how to get it installed and working between the two plugins :/

Silvers 01-30-2012 16:22

Re: [L4D & L4D2] Mini Gun Spawner (1.2) [14-Jan-2011]
 
Yes that's it, not very hard is it... Change "l4d_mini_gun_random" to -1 if you want all mini guns to spawn, otherwise it will randomly only select 2 for spawning (or whatever number you specify).

chatyak 01-30-2012 16:52

Re: [L4D & L4D2] Mini Gun Spawner (1.2) [14-Jan-2011]
 
I got it working - thank you silvers for the plugin :) Although, when I use sm_mgsave and then sm_mgclear - it always leaves the miniguns on the map and I have to clear them each time I load the map.

EDIT** woops - I need sm_mgwipe :P

Silvers 06-23-2012 15:56

Re: [L4D & L4D2] Mini Gun Spawner (1.4) [23-Jun-2012]
 
1.4 (23-Jun-2012)
- Fixed a stupid mistake which created entities and never deleted them.

Mitsuru 07-03-2013 06:16

Re: [L4D & L4D2] Mini Gun Spawner (1.4) [23-Jun-2012]
 
Unable to spawn 50cal! Regardless sm_mg 50cal or sm_mg minigun, only spawning minigun.

Silvers 07-04-2013 12:57

Re: [L4D & L4D2] Mini Gun Spawner (1.4) [23-Jun-2012]
 
Quote:

sm_mg // Spawns a temporary Mini Gun at your crosshair. Usage: sm_mg <0|1> (0=.50 Cal / 1=Minigun).
Beacause you don't read, it's not sm_mg minigun, it's sm_mg 0 or sm_mg 1

Silvers 07-21-2013 12:50

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Plugin updated

1.5 (21-Jul-2013)
- Removed Sort_Random work-around. This was fixed in SourceMod 1.4.7, all should update or spawning issues will occur.

chatyak 08-05-2013 17:56

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Just had error:

L 08/05/2013 - 16:54:08: [l4d_mini_gun.smx] Error: 0,0,0 origin. Iteration=1. Index=0. Count=1.

Silvers 08-07-2013 19:08

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
That error is due to running version 1.4. All must update to 1.5. But there is a minor issue with that piece of code which I wrote and subsequently copied into 10 other plugins of mine. It will produce that error if the X origin is at 0.0 in the world, but that's quite unlikely so it's not a problem. I'll fix it one day.

wendigo 08-27-2013 23:38

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Awesome plugin amigo. I just installed it for the very first time. And its time to have some fun in my server.
Also thanks for keeping it updated.

As some authors tends to abandon their plugins leaving them ancient old. Because they went inactive, or what I know.

Now for the stupid question:
sm_mgwipe -- does that also delete the fixed default mini guns, that were in the current map, and then they will NEVER be loaded again?

Silvers 08-28-2013 00:49

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Quote:

Originally Posted by wendigo (Post 2023058)
sm_mgwipe -- does that also delete the fixed default mini guns, that were in the current map, and then they will NEVER be loaded again?

Only those created by this plugin.

wendigo 08-28-2013 12:37

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Quote:

Originally Posted by Silvers (Post 2023077)
Only those created by this plugin.


Cool. I was just a little uncertain. Since it said it deleted from config :)

kirahaku 05-22-2014 16:06

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
So having an issue, I can get them to spawn and all and it says it save there location to the cfg file but when map changes and or reloads they are not there......

used sm_mg 0, sm_mg 1
Also tried sm_mgsave 1 and sm_mgsave 0

same result with both, how do i get them to load on there own?

leonardo martinez 06-08-2014 17:38

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Plugin failed to compile! Please try contacting the author. I can not download. Will you help me? please help!

mrelfire 06-09-2014 07:35

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Quote:

Originally Posted by leonardo martinez (Post 2148544)
Plugin failed to compile! Please try contacting the author. I can not download. Will you help me? please help!

same problem ;)

=> I have to compile manually


also is somebody has got a list of points as a suggestion to use ?

Silvers 06-10-2014 11:26

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Nothing changed, this seems to be an issue with the forum.

Overwatch_Soldier 08-22-2014 19:30

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Hello Silvers.
Why when I try to spawn the Machinegun with command "sm_mg 0 or 1" there's a message said, I must on a dedicated server to use that command. Can you remove those code from your plugin to allow use on "Non Dedicated Server"?

crazy89 08-30-2014 20:26

Re: [L4D & L4D2] Mini Gun Spawner (1.2) [14-Jan-2011]
 
I all but 0.50 does not work put 1 or 0 appears only 1 machine gun how to fix it?l4d_mini_gun_random- I did not then .... sorry for my english

WhataMack 01-03-2018 08:28

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
Just as an fyi, I've tried using the spawning plugin for more than 48 machine guns across all the standard and custom maps on my server, but ran out of available slots. So, I changed the maximum number in the plugin's source code from 48 to 96, then compiled the source and that works fine. Also, it turns out I hadn't changed the "l4d_mini_gun_random" setting in "cfg > sourcemod > l4d_mini_gun.cfg" to "-1" to ensure all the mini-gun locations I'd saved will spawn where they were saved.

So, with a small amount of work I was able to customize this really nice plugin to fit what I wanted it to do.

Thanks once again to Silvers for providing a great plugin. My server is full of your plugins and it's become an excellent, fun environment for L4D2. :up:

Mister_Game_Over 02-19-2018 16:01

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
1 Attachment(s)
L4D - 50cal Minigun

PHP Code:

L4D2 

entity 
CreateEntityByName("prop_minigun");
SetEntityModel(entityMODEL_50CAL);

entity CreateEntityByName ("prop_minigun_l4d1");
SetEntityModel(entityMODEL_MINIGUN);

L4D

entity 
CreateEntityByName("prop_mounted_machine_gun");
SetEntityModel(entityMODEL_50CAL);

entity CreateEntityByName ("prop_minigun");
SetEntityModel(entityMODEL_MINIGUN); 

Photo
https://img-fotki.yandex.ru/get/3707...cd1cfae6_L.jpg

Silvers 03-24-2018 07:46

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
I know some are old messages. Replying for future reference to whoever.



Quote:

Originally Posted by Overwatch_Soldier (Post 2187988)
Hello Silvers.
Why when I try to spawn the Machinegun with command "sm_mg 0 or 1" there's a message said, I must on a dedicated server to use that command. Can you remove those code from your plugin to allow use on "Non Dedicated Server"?

This is something I do with all my plugins, when Local Server your client index is 0 which is the same as a Dedicated Servers index. So it's blocked to prevent bugs when a dedicated server runs a command intended for clients. Sure could probably do IsDedicatedServer() check etc. But there are probably other times and plugins which may bug because 0 is both server and client, and probably need a distinction. All my stuff was created on Dedicated Server, so that's pretty much all I support.





Quote:

Originally Posted by crazy89 (Post 2192082)
I all but 0.50 does not work put 1 or 0 appears only 1 machine gun how to fix it?l4d_mini_gun_random- I did not then .... sorry for my english

"_random" cvars in my plugins are Integers, not Floats. So it will round to the nearest whole number. Meaning you get only 0, 1, or 2. Not 1.5.





Quote:

Originally Posted by WhataMack (Post 2569491)
So, I changed the maximum number in the plugin's source code from 48 to 96, then compiled the source and that works fine.

The spawn limits are mostly because certain maps will have many less entities available, and various plugins will decrease the free slots.





Quote:

Originally Posted by Mister_Game_Over (Post 2579061)
L4D - 50cal Minigun

Thanks but I don't understand why. The model seems identical to what's already in L4D1 and accessible to this plugin. What am I missing?

Mister_Game_Over 04-12-2018 18:44

Re: [L4D & L4D2] Mini Gun Spawner (1.5) [21-Jul-2013]
 
/////////////////////////////////////

new

g_bLeft4Dead & g_bLeft4Dead2

/////////////////////////////////////
PHP Code:

                (L4D)                                                                           (L4D2)

entity CreateEntityByName("prop_mounted_machine_gun");  VS   entity CreateEntityByName("prop_minigun");
SetEntityModel(entityMODEL_50CAL);                                      SetEntityModel(entityMODEL_50CAL);
          

entity CreateEntityByName ("prop_minigun");       VS               entity CreateEntityByName ("prop_minigun_l4d1");
SetEntityModel(entityMODEL_MINIGUN);                                 SetEntityModel(entityMODEL_MINIGUN);
           

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

g_bLeft4Dead

entity 
CreateEntityByName("prop_mounted_machine_gun"); // type = 0
SetEntityModel(entityMODEL_50CAL);

entity CreateEntityByName ("prop_minigun");                    // type = 1
SetEntityModel(entityMODEL_MINIGUN);       

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

g_bLeft4Dead2

entity 
CreateEntityByName("prop_minigun");               // type = 0
SetEntityModel(entityMODEL_50CAL);            

entity CreateEntityByName ("prop_minigun_l4d1");       // type = 1
SetEntityModel(entityMODEL_MINIGUN); 


Dominatez 09-10-2022 15:00

Re: [L4D & L4D2] Mini Gun Spawner (1.8) [10-May-2020]
 
Now showing this error when compiling using the sourcemod.net compiler.

Code:

phpcsReqM.sp(279) : warning 242: function "tmrStart" should return an explicit value

Silvers 09-10-2022 16:26

Re: [L4D & L4D2] Mini Gun Spawner (1.8) [10-May-2020]
 
Quote:

Originally Posted by Dominatez (Post 2788500)
Now showing this error when compiling using the sourcemod.net compiler.

Code:

phpcsReqM.sp(279) : warning 242: function "tmrStart" should return an explicit value

It's just a warning.

Lebo 08-07-2023 14:03

Re: [L4D & L4D2] Mini Gun Spawner (1.9) [11-Dec-2022]
 
does anybody have the smx? :cry:

HarryPotter 08-07-2023 14:52

Re: [L4D & L4D2] Mini Gun Spawner (1.9) [11-Dec-2022]
 
Quote:

Originally Posted by Lebo (Post 2808345)
does anybody have the smx? :cry:

Click "Get Source" and compile locally.

Lebo 08-08-2023 17:46

Re: [L4D & L4D2] Mini Gun Spawner (1.9) [11-Dec-2022]
 
Quote:

Originally Posted by HarryPotter (Post 2808347)
Click "Get Source" and compile locally.

all i get is the sp file. am i missing something? im on the browser :(

Lebo 08-08-2023 17:54

Re: [L4D & L4D2] Mini Gun Spawner (1.9) [11-Dec-2022]
 
oh i understand, i got it. thank you. i never knew that was a feature this whole time and i thought some sourcemodes were broken like this one. tyyyyyyyyyyyyyyyyy :fox:


All times are GMT -4. The time now is 07:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.