Raised This Month: $ Target: $400
 0% 

Too few CT spawnpoints


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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