AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   max spawn points. (https://forums.alliedmods.net/showthread.php?t=54899)

pRED* 05-07-2007 03:28

max spawn points.
 
Not entirely sure if this is possible..

In CS if theres more players than spawn points, it won't let people join a team (message 'both teams are full')..
In Dm mods like csdm or gg this isn't necessary because there will almost always be spawn points free.

Is there a way to let people join a team even though they are full, and have some delayed spawning code on new round to prevent problems.
Eg if the team has more people than spawn points, delay the extra peoples spawn by 5 seconds... (or have a loop that searches for a free spawn using trace_hull or similar)

I'm quite happy to write the plugin just need a point in the right direction

mogel 05-07-2007 03:54

Re: max spawn points.
 
Moin,

http://forums.alliedmods.net/showthread.php?p=371317

the best editor ... imo

hand, mogel

pRED* 05-07-2007 04:31

Re: max spawn points.
 
Yea I realise that would work, but thanks anyway.

Was just trying to figure out if there was a way to make better use of the current spawns rather than create new ones.

pRED* 05-13-2007 18:01

Re: max spawn points.
 
Anyone got any ideas?

Overriding the "both teams are full message", and letting people join anyway..?

djmd378 05-14-2007 03:10

Re: max spawn points.
 
Just edit the map it self... Thats what I do atlest.

I have about a total of 62 spawns for de_dust2! LOL

pRED* 05-14-2007 03:35

Re: max spawn points.
 
Just to make things clear.

I *know* you can edit the map to have more spawn, I *know* you can use an amxx plugin to create more spawns on map load.

I'm interested in designing a way to make do with the current number of spawns but use them more efficiently to handle a larger number of players.

I will have a go with message logging to see if I can find out if the "both teams are full" message and not letting you join a team is server or client side.
Don't really have time at the moment, so I just thought I'd ask if anyone knew anything about to save me some time.
Out of the blue idea that I was interested in developing.. Kinda hoping VEN or someone similar who seems to have memorised the entire SDK would have some idea to point me in the right direction. :)

djmd378 05-14-2007 04:04

Re: max spawn points.
 
Quote:

Originally Posted by pRED* | NZ (Post 474234)
Not entirely sure if this is possible..
In Dm mods like csdm or gg this isn't necessary because there will almost always be spawn points free.

Wrong. If the map doesn't have enough spawn points, it won't allow more than X players on a team. X depends on the number of spawns the map has for the team.

Quote:

Originally Posted by pRED* | NZ (Post 474234)
Is there a way to let people join a team even though they are full, and have some delayed spawning code on new round to prevent problems.
Eg if the team has more people than spawn points, delay the extra peoples spawn by 5 seconds... (or have a loop that searches for a free spawn using trace_hull or similar)

I'm quite happy to write the plugin just need a point in the right direction

No because it will still say that the teams is full because of the reason above.

Quote:

Originally Posted by pRED* | NZ (Post 476453)
I'm interested in designing a way to make do with the current number of spawns but use them more efficiently to handle a larger number of players.

My reason above.

Quote:

Originally Posted by pRED* | NZ (Post 476453)
I will have a go with message logging to see if I can find out if the "both teams are full" message and not letting you join a team is server or client side.

Its most likely server sided.

pRED* 05-14-2007 04:21

Re: max spawn points.
 
I not really sure why I have to explain this yet again.

I know it wont let you join a team if theres more people than spawn points!
I want to override the functionality because in constant respawn mods (csdm, gg, surf respawning etc), there will most likely be a free spawn (free as in noone standing at that location) becuase all the players have moved into the map.

Normal CS: All players spawn at once. Need 1 Spawn point per player.

CSDM: Players constantly spawning, could quite easily handle 50% extra players than there is spawn points (if you include a delayed spawn for those extra players on the case of round restart).

You understand yet or am I going to have to resort to one syllable words only?
Block teams are full message, let player join anyway, intelligently handle spawning to avoid two players spawning into each other.

djmd378 05-14-2007 04:36

Re: max spawn points.
 
W/e.

But heres a thought if you can some how block "team full". After players has spawned, set task and respawn those who died.

ian.cammarata 05-24-2007 01:59

Re: max spawn points.
 
Code:

public pfn_keyvalue(ent){
    static bool:first_run=true
    new id
    if(first_run){
        for(new i=0;i<32;i++){
            id=create_entity("info_player_start")
            if(id>0){
                dyn_spawn_count++
                dyn_spawn_ids[dyn_spawn_count]=id
                entity_set_int(id,EV_INT_iuser1,1)//flag ent so we know it's one we made
                //DispatchKeyValue(temp_ent,"origin","0 0 0")
                //DispatchKeyValue(temp_ent,"angles","0 0 0")
            }
        }
        first_run=false
    }
}

That is the basics of what you need. However this only adds ct spawns, and these spawn points aren't assigned an origin so they will be located at 0,0,0 and will therefore be disabled, but it will allow people to join the team. I believe that using just this code will result in telefragging some players when they spawn.

Spawn points are cached by the engine during the map loading process, so all modification of them needs to be done using the pfn_keyvalue forward, which runs while the map is being loaded, each time an entity is assigned a key(ie: several iterations per entity). If you want to do this with a plugin you'll have to write some code in addition to what I've pasted that will find a safe location for the spawn points in proximity to the ones that already come with the map.


All times are GMT -4. The time now is 06:43.

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