Raised This Month: $32 Target: $400
 8% 

Spawnpoints Creator - Easy to use spawn points managing library


Post New Thread Reply   
 
Thread Tools Display Modes
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 05-29-2011 , 12:24   Re: Spawnpoints Creator - Easy to use spawn points managing library
Reply With Quote #11

Quote:
Originally Posted by Chanz View Post
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. :-)
This library has nothing to do with actual spawn points in the map, it just facilitates the handling of custom points in the map. I guess the name is misleading, but I don't know what else to call it (points creator? ).
Seta00 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-03-2012 , 11:47   Re: Spawnpoints Creator - Easy to use spawn points managing library
Reply With Quote #12

Thanks for this. After switching to this library, the code isn't that bloated anymore.
I had to fix some issues though:
  • The __showSpawnsSprite glowing sprite is only precached in OnPluginStart where you initialize the library. After a mapchange the glows show some random model like some viewmodel or similar. I sepereated the precaching into another stock SC_SetSpawnSprite(showSpawnsSprite = -1).
  • The KV handle isn't closed after writing to the config file.
  • The main menu command handler is missing a return Plugin_Handled;
  • If no config dir given, it still uses the plugin name with spaces instead of the one with replaced underscores.
Additionally the rotation of the spawnpoint was important, so that's saved now too.
Attached Files
File Type: inc spawnpoints.inc (12.8 KB, 186 views)
__________________
Peace-Maker is offline
Despirator
Senior Member
Join Date: Jun 2011
Location: Kazakhstan ->Shymkent
Old 11-04-2012 , 15:17   Re: Spawnpoints Creator - Easy to use spawn points managing library
Reply With Quote #13

i would prefer to see this too

PHP Code:
new __nextSpawnpoint;

stock SCError:SC_GetNextSpawnPoint(Float:spawn[3], Float:rotation[3]) {
    if (!
__initialized)
        
ThrowError("Spawnpoint Creator not initialized");
    
    new 
__array GetArraySize(__spawns);
        
    if (!
__array)
        return 
SC_NoSpawns;
    
    if (
__nextSpawnpoint >= __array)
    {
        
__nextSpawnpoint 0;
    }
    
GetArrayArray(__spawns__nextSpawnpointspawn);
    
GetArrayArray(__rotations__nextSpawnpointrotation);
    
__nextSpawnpoint++;
    return 
SC_NoError;

Despirator is offline
rekcah
Member
Join Date: Jun 2019
Old 04-10-2021 , 20:46   Re: Spawnpoints Creator - Easy to use spawn points managing library
Reply With Quote #14

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.
Attached Files
File Type: inc spawnpoints.inc (12.8 KB, 44 views)

Last edited by rekcah; 04-10-2021 at 22:34.
rekcah is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:02.


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