Raised This Month: $ Target: $400
 0% 

Too few CT spawnpoints


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 01-07-2006 , 01:20   Too few CT spawnpoints
Reply With Quote #1

Hi,

some maps on our server aren't providing enough spawn-points. I need only those CT ones (info_player_start)

Following code is a part of plugin_init( ), but it's not working. It creates all necessary spawns, according to what it prints to server console, but they're not at least functional.

Code:
new entid = -1 while ((entid = find_ent_by_class(entid, "info_player_start")) != 0) spawn_point_count++ server_print("[%s] Found %d CT spawn points.", PLUGIN_NAME, spawn_point_count) new n = (get_maxplayers() - spawn_point_count) if (n > 0)   {     server_print("[%s] Need %d more spawn points. Creating.", PLUGIN_NAME, n)     for (new i = 0; i < n; i++)       {         if ((entid = create_entity("info_player_start")) > 0)           {             spawn_point_count++             entity_set_origin(entid, spaw_point_origin)           }       }   } else server_print("[%s] No new spawn points are needed.", PLUGIN_NAME)

Can you please help and tell me what's wrong? Ty.
alien is offline
Send a message via ICQ to alien
Des12
Senior Member
Join Date: Jan 2005
Old 01-07-2006 , 01:43   Re: Too few CT spawnpoints
Reply With Quote #2

Code:
new entid = -1 while ((entid = find_ent_by_class(entid, "info_player_start")) != 0) spawn_point_count++ server_print("[%s] Found %d CT spawn points.", PLUGIN_NAME, spawn_point_count) new n = (get_maxplayers() - spawn_point_count) new entspawn[33] if (n > 0)   {     server_print("[%s] Need %d more spawn points. Creating.", PLUGIN_NAME, n)     for (new i = 0; i < n; i++)       {             entspawn[i] = create_entity("info_player_start")             spawn_point_count++             entity_set_origin(entspawn[i], spawn_point_origin)                 }   } else server_print("[%s] No new spawn points are needed.", PLUGIN_NAME)

Fixed up abit...but how are you going to rotate the spawn_point_origin's? I added a 'n' btw to the end of that.
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 01-07-2006 , 02:20   Re: Too few CT spawnpoints
Reply With Quote #3

Quote:
Originally Posted by Des12
Fixed up abit...but how are you going to rotate the spawn_point_origin's? I added a 'n' btw to the end of that.
Code:
entity_set_int(ent, EV_INT_fixangle, 1); entity_set_vector(ent, EV_VEC_v_angle, Float:angle[3]);
Or something, bla..

http://www.amxmodx.org/funcwiki.php?...d=333#comments
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 01-07-2006 , 14:02  
Reply With Quote #4

Well, it's not working anyway. I read somewhere on these forums, that it's not possible because of caching map entities during map load. I should check Deathmatch source and figure out somehow.
alien is offline
Send a message via ICQ to alien
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-07-2006 , 14:04  
Reply With Quote #5

You could use Stripper2 to add some in.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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:07.


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