Quote:
Originally Posted by ReZy
// >>> Basic parameters <<<
"max rockets" "1" //Change this to 3
As for regarding for players on how many rockets it should spawn per player, that might have to be coded into the plugin.
Also no idea about this, but also into the map. I have 1 map which spawns 2 rockets, but another which spawns 1.
Might want to get a coder for more detailed explanation.
|
This would probably be fairly easy to implement, check how many players are in game, then set a multiplier for number of rockets for each multiple of 6 players you have in the server, 1-6= 1 rocket 7-12 = 2 13-18 = 3 etc
I would attempt to do this myself but looking at the 2k+ lines i'll either leave it so someone else or do it for a price, the time for testing etc will be a lot for something like that to make sure everything is all working
You should have a look through the source code and check the variables, more importantly the ones to do with max rockets etc (not MAX_ROCKETS, but the g_iSpawnersMaxRockets array)
i'm going to say it's somewhere in this part of the code;
PHP Code:
public Action:OnDodgeBallGameFrame(Handle:hTimer, any:Data)
{
// Only if both teams are playing
if (BothTeamsPlaying() == false) return;
// Check if we need to fire more rockets.
if (GetGameTime() >= g_fNextSpawnTime)
{
if (g_iLastDeadTeam == _:TFTeam_Red)
{
new iSpawnerEntity = g_iSpawnPointsRedEntity[g_iCurrentRedSpawn];
new iSpawnerClass = g_iSpawnPointsRedClass[g_iCurrentRedSpawn];
if (g_iRocketCount < g_iSpawnersMaxRockets[iSpawnerClass])
{
CreateRocket(iSpawnerEntity, iSpawnerClass, _:TFTeam_Red);
g_iCurrentRedSpawn = (g_iCurrentRedSpawn + 1) % g_iSpawnPointsRedCount;
}
}
else
{
new iSpawnerEntity = g_iSpawnPointsBluEntity[g_iCurrentBluSpawn];
new iSpawnerClass = g_iSpawnPointsBluClass[g_iCurrentBluSpawn];
if (g_iRocketCount < g_iSpawnersMaxRockets[iSpawnerClass])
{
CreateRocket(iSpawnerEntity, iSpawnerClass, _:TFTeam_Blue);
g_iCurrentBluSpawn = (g_iCurrentBluSpawn + 1) % g_iSpawnPointsBluCount;
}
}
}
// Manage the active rockets
new iIndex = -1;
while ((iIndex = FindNextValidRocket(iIndex)) != -1)
{
switch (g_iRocketClassBehaviour[g_iRocketClass[iIndex]])
{
case Behaviour_Unknown: {}
case Behaviour_Homing: { HomingRocketThink(iIndex); }
}
}
}
The number of players in game (or just alive players) would need to be retrieved then used to set a multiplier. Not sure how you would do that but yeah, i think its going to be some part of that bit of code that needs editing.