There are a couple of plugins that have a similar purpose to this suggestion as seen
here and
here but what I was really looking for was it has these features:
- The map file is not updated upon this plugin but rather like a "mapname.cfg" is what adds the weapon spawns in the map
- Automatically generates a "mapname.cfg" in /addons/sourcemod/configs/weaponspawns/ when a new map is loaded without a .cfg file. If this is not possible to be created, then the person must manually create a .cfg file to be wrriten on for the current map.
- The chance and quantity of each type of weapon can be set
- Adding spawnpoints as one of the features is optional (though I highly recommend it if you plan to make this plugin as an official release to others as well). Meaning there would be a command to allow the plugin to automatically spawn random weapons on the map or that specific spawnpoints set by the player admin is where the spawns may or may not spawn or both. Example (though preferably if created like this):
// Default: 1
sm_weaponspawn_enable 0/1 // 0 - disable 1 - enable
// Default: 1
sm_weaponspawn_spawntype 1/2/3 // 1 - enable random weapon spawn 2 - enable random weapon on set spawnpoint(s) 3 - both
sm_weaponspawn_list // Shows the weapon spawn list
sm_weaponspawn_add // Adds a weapon spawn point on where the player is standing. If specified what weapon, it will only spawn that weapon in that spawn point only
sm_weaponspawn_undo // Deletes last spawnpoint
sm_weaponspawn_reset // Resets all weapon spawns on current map
// Default: 1
sm_weaponspawn_skin 0/1 (optional!) // 0 - Weapon spawns have no skin by default 1- Weapon spawns will follow player's skin on pickup
// Default: 0
sm_weaponspawn_clearweapons 0/1 // 0 - Maps with premade weapon spawns by default will not be deleted 1 - Deletes all premade weapon spawns on the map
- Compatability with CS:GO Steam Workshop maps
The config file in /addons/sourcemod/configs/weaponspawns/mapname.cfg can look something like this:
Code:
"mapname"
{
"min_spawns" "10" // Default amount in every .cfg file generated. This comment is not needed to be added in the actual config file
"max_spawns" "32" // Default amount in every .cfg file generated. This comment is not needed to be added in the actual config file
// Weapon spawnpoints are below
"#1"
{
"pos" "-100 -100 -100"
}
"#2"
{
"pos" "-200 -200 -200"
"weaponspawn type" "ak47" // Only added if sm_weaponspawn_add is specified. This comment is not needed to be added in the actual config file
}
}
The other config found in /addons/sourcemod/configs/ can be found here:
Code:
"Weapon-Spawn"
{
"AWP"
{
"chance" "25" // in percentage
"minimum" "0"
"maximum" "1"
}
"AK47"
{
"chance" "75"
"minimum" "1
"maximum" "3"
}
}
The reason why I ask for someone to create this plugin when something similar is already created is because I noticed that with
this plugin it actually seems to give the clients too many packets (the console actually outputs that), causing them to actually have a timeout countdown for a few seconds, which makes the player think that it is a server issue. I also realised that the plugin saves your spawn so as long the server does not restart, which in some cases should the server ever crash I would have to set the spawns again.
Also if you are wondering why I prefer a config file over actually changing the whole map is actually because I use the Steam Workshop for the maps to download, so should there ever be a map update, the whole previous spawns will be resetted once again. Also, players then can delete spawnpoints in there should they ever forget to undo their last spawnpoint (oh ya btw that means that each time a new spawn point is added, the pos will say in the client's chat). Besides, I think that the map would be updated each time the server loads because the server has to revalidate to become same as the Steam Workshop's map.
Possible Questions you might have...
Q: What use does this plugin have?
A: Well for a lot of maps I play actually, most notably jailbreak and ttt maps, they don't come with weapon spawns. Which is why this plugin would be useful for many JB and TTT owners in CS:GO to use to add weapon spawns in the map or simply have the plugin run it to automatically place the weapon spawns
Q: Why should I create a config file over actually changing the whole map? Also, can't Valve's hammer editor do this?
A: Well for starters, I would think that when you actually edit the whole map, clients who have existing map files would be unable to join the server because their map differs from the server's which has weapon spawns. Also this way it is more flexible for different servers. Some servers prefer having spawnpoints for weapon at different places. Though it is proven to be fixed in sm_weaponspawn_clearweapons 1, but I think it is more unlikely to cause client and server file confliction if the map was just clear instead. Also for idiots like myself who do not know how to use hammer (and I've heard that there are issues with it being slow and all), it would be impossible for me to add weapon spawns in.
Q: What you demand is unreasonable, there are certain things that you can't do or it's too hard as you stated!
A: I would admit that what I demand is little bit ambitious with all the plugin commands and all, but if you do manage to do it and update it to work with games other than CS:GO, it would be really useful! Oh and btw I have about
zero knowledge when it comes to SourcePawns or the stuff to create plugins so I do not know of the limitations of what SourceMod plugins can do, forgive me if I gave really gave impossible features suggestions. I also gave you my idea of how I envision the plugin should look and have, and also thought that I would cut some of your worries by naming it and creating the files as seen above in the examples. Of course you have my thanks for using my way
Thanks in advance~
EDIT: This plugin has been fufilled by Zipcore. Credits to him for
his plugin!