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.
__________________