Spawnpoints Creator - Easy to use spawn points managing library
5 Attachment(s)
Spawnpoints Creator This library manages spawn points, it's a plug-and-play configurable spawn points feature to your plugins. http://forums.alliedmods.net/picture...681249&thumb=1 http://forums.alliedmods.net/picture...681249&thumb=1 http://forums.alliedmods.net/picture...681219&thumb=1 http://forums.alliedmods.net/picture...681219&thumb=1 http://forums.alliedmods.net/picture...681219&thumb=1 Table of Contents: Rationale: After having to copy-paste several lines of spawn point management code in three plugins, I decided I was going to make it into a library and release. Besides making my life easier, the benefits are several: more people can test it, I can add configurable spawn points feature to existing plugins with only a few extra lines, and it seems I don't have anything released here (yet) :D API:
SC_Initialize: Call this to initialize the library. This must be called once per-plugin, so it's generally called OnPluginStart. Params:
PHP Code:
Loads the config file for this map. The config file is addons/sourcemod + configFileDir + mapname.spawns (addons/sourcemod/my_plugin/de_dust2.spawns). This is normally called OnMapStart. Return values:
PHP Code:
Saves the current spawn points to the config file. See SC_LoadMapConfig for how the config file name is generated. This is normally called OnMapEnd. Return values:
PHP Code:
Returns a Handle to the internal ADT array used by the library to store spawn points. PHP Code:
Get a random spawn point. Params:
PHP Code:
Manually add a spawn point from its coordinates. Params:
PHP Code:
Shows or hides saved spawn points to clients. Uses a GlowSprite TE with a sprite specified by showSpawnsSprite. See screenshots. Params:
PHP Code:
Limit the amount of spawn points to 10, let the library create the admin menu and all the editing commands, and provide a command to dump the coordinates of the saved spawn points: PHP Code:
PHP Code:
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
Wow this is really neat. I love how it shows the location of spawns that you already placed.
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
Nice, I always wanted to write such a plugin, but never had the time.
What about if you replace the lights by real player models ? Maybe a little transparent :) |
Re: Spawnpoints Creator - Easy to use spawn points managing library
Quote:
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
Because it's called "Spawnpoints creator" I kinda thought it does exactly that, too bad ^^
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
Updated to fix a problem with infinite spawns.
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
do you also support different spawnpoints for t and ct? If not, could you implement it? Thanks a lot
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
Fixed a bug where the plugin wouldn't clear the previous map spawns if it couldn't find the .spawns file.
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
Add Coordinate groups please.
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
Could you add an array that contains the orginal spawnpoints of the map?
I'd like to see what spawn points the mapper set and those I set with this lib. Also a reset and/or undo would be nice. :-) |
Re: Spawnpoints Creator - Easy to use spawn points managing library
Quote:
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
1 Attachment(s)
Thanks for this. After switching to this library, the code isn't that bloated anymore.
I had to fix some issues though:
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
i would prefer to see this too
PHP Code:
|
Re: Spawnpoints Creator - Easy to use spawn points managing library
1 Attachment(s)
I've attempted to update the syntax, not sure if I messed it up or not tho, seems to still work properly in the plugins I'm using it with. its the position and rotation version.
|
All times are GMT -4. The time now is 06:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.