Raised This Month: $ Target: $400
 0% 

Replace spawns?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 02-17-2009 , 10:03   Replace spawns?
Reply With Quote #1

First off, I am aware of the Map Spawns Editor plugin, but I don't want to use that because I only need to fix the spawns on one of my maps.


So what I want to do is first strip all the spawns. I think this should take care of that.

PHP Code:
tspawns engfunc(EngFunc_FindEntityByStringent"classname""info_player_deathmatch");
        
engfunc(EngFunc_RemoveEntitytspawns);
ctspawns engfunc(EngFunc_FindEntityByStringent"classname""info_player_start");
        
engfunc(EngFunc_RemoveEntityctspawns); 
Now I am having trouble setting the new spawns.


Is it possible to store the new tspawns and the new ctspawns in their own array?


EX: My two ct spawns

-943 -367 190 0 1 0
-949 -113 190 0 1 0

my two t spawns

-955 138 190 0 1 0
-961 420 190 0 1 0


And then have some function like foreach line in the array create a new spawn and set the angle?

Sorry if this is confusing
VMAN is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-17-2009 , 18:49   Re: Replace spawns?
Reply With Quote #2

Quote:
Originally Posted by VMAN View Post
First off, I am aware of the Map Spawns Editor plugin, but I don't want to use that because I only need to fix the spawns on one of my maps.
Then use a per-map plugins.ini for that map and enable Map Spawns Editor for that map.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
BFK_GoNER
Junior Member
Join Date: Feb 2009
Location: Holland
Old 02-18-2009 , 05:39   Re: Replace spawns?
Reply With Quote #3

Alternatively, you could change the map entities directly using ripent. It extracts the entities list and parameters from .bsp, which you can change easily and import back into the map. The clients won't have to download any extra files because the entities list is sent to them each time anyway.

How to use:
1) Put the .bsp map file and ripent.exe in the same folder
2) Run ripent with keys: -extract -texdata1 YourMapName
3) Edit the .ent file, in your case change the entities' locations
4) Import the list back into .bsp by ripent with keys: -import -texdata1 YourMapName
5) Restart the server

You can add/delete/change any other entities you like, not only info_player_deathmatch and info_player_start. Check this website for more info.

Download ripent: here or here or here or here
BFK_GoNER is offline
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 03-30-2009 , 23:19   Re: Replace spawns?
Reply With Quote #4

I've done what exolent recommended.

However, can you please just show me some example code that can do this?
VMAN is offline
Reply



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 16:52.


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