Jump to content

TheSilencerPL

Management
  • Posts

    3082
  • Joined

  • Last visited

  • Days Won

    94

Posts posted by TheSilencerPL

  1. Fixed version. I've fixed it for Pixelowy on his request, but I will share it here, so that everyone can have some use of it.

    modname = "balance"
    version = "0.2"
     
    function et_InitGame(levelTime,randomSeed,restart)
    	et.RegisterModname(modname .. " " .. version)
    end
     
    unevenDiff = 2
    max_unevenTime = 15
    max_unevenDiff = 4
     
    axisPlayers = {}
    alliedPlayers = {}
    unevenTime = 15
    immuneLvl = 12
    
    function putTeam(clientNum, team)
    	if clientNum == -1 then return end
    
    	local teamStr
    	if ( team == "AXIS" ) then
    		teamStr = " r"
    	else
    		teamStr = " b"
    	end
    		
    	et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. teamStr )
    	et.trap_SendConsoleCommand( et.EXEC_APPEND, "playsound playermove.wav\n" )
    	et.trap_SendServerCommand(-1, "chat \"balancing teams... " .. et.gentity_get( clientNum, "pers.netname" ) .. "^7 moved to ^1" .. team .. "\"" ) 
    end	
    
    function longEnough(levelTime)
    	return (tonumber(levelTime) - unevenTime >= max_unevenTime * 1000)
    end
    
    -- check if the level can be moved
    function goodLevel(clientNum)
    	return ( et.G_shrubbot_level(clientNum) < immuneLvl)
    end
    
    -- pick player from the team specified by the parameter
    -- pick only players with lower than immuneLvl level
    -- return -1 if not found
    function pickPlayer(team)
    	if team == "AXIS" then
    		for clientNum = #axisPlayers,1,-1 do
    			if goodLevel(axisPlayers[clientNum]) then
    				return axisPlayers[clientNum]
    			end
            	end
    	else
    		for clientNum = #alliedPlayers,1,-1 do
    			if goodLevel(alliedPlayers[clientNum]) then
    				return alliedPlayers[clientNum]
    			end
            	end
    	end
    
    	-- not found -- all higher admins?
    	return -1
    end
    
    function pickFromAndMove(from, to)
    	local clientNum = pickPlayer(from)
    	putTeam(clientNum, to)
    end
    
    
    function et_RunFrame( levelTime )
    	local numAlliedPlayers = table.getn( alliedPlayers )
    	local numAxisPlayers = table.getn( axisPlayers )
    	
    	if numAlliedPlayers >= numAxisPlayers + max_unevenDiff then
    		pickFromAndMove("ALLIES", "AXIS")
    	elseif numAxisPlayers >= numAlliedPlayers + max_unevenDiff then
    		pickFromAndMove("AXIS", "ALLIES")	
    	elseif numAlliedPlayers >= numAxisPlayers + unevenDiff then
    		if unevenTime > 0 then
    			if longEnough(levelTime) then
    				pickFromAndMove("ALLIES", "AXIS")
    			end
    		else
    			unevenTime = tonumber( levelTime )
    		end
    	elseif numAxisPlayers >= numAlliedPlayers + unevenDiff then
    		if unevenTime > 0 then
    			if longEnough(levelTime) then
    				pickFromAndMove("AXIS", "ALLIES")
    			end
    		else
    			unevenTime = tonumber( levelTime )
    		end
    	else
    		unevenTime = -1
       	end
    end
     
    function et_ClientSpawn( clientNum, revived, teamChange, restoreHealth )
       if teamChange ~= 0 then
          local team = tonumber( et.gentity_get( clientNum, "sess.sessionTeam" ) )
          -- these were the teamnumbers prior to the move
          local numAlliedPlayers = table.getn( alliedPlayers )
          local numAxisPlayers = table.getn( axisPlayers )
          if team == 1 then
             for i, num in ipairs( alliedPlayers ) do
                if num == clientNum then
                   table.remove( alliedPlayers, i )
                   break
                end
             end
             -- this should not happen but still check for it to avoid doubles
             for i, num in ipairs( axisPlayers ) do
                if num == clientNum then
                   return
                end
             end
             -- make sure a player who (got) moved when teams were uneven doesn't get moved right back
             if numAlliedPlayers >= numAxisPlayers + unevenDiff then
                table.insert( axisPlayers, 1, clientNum )
             else
                table.insert( axisPlayers, clientNum )
             end
          elseif team == 2 then
             for i, num in ipairs( axisPlayers ) do
                if num == clientNum then
                   table.remove( axisPlayers, i )
                   break
                end
             end
             for i, num in ipairs( alliedPlayers ) do
                if num == clientNum then
                   return
                end
             end
             if numAxisPlayers >= numAlliedPlayers + unevenDiff then
                table.insert( alliedPlayers, 1, clientNum )
             else
                table.insert( alliedPlayers, clientNum )
             end
          else
             for i, num in ipairs( alliedPlayers ) do
                if num == clientNum then
                   table.remove( alliedPlayers, i )
                   return
                end
             end
             for i, num in ipairs( axisPlayers ) do
                if num == clientNum then
                   table.remove( axisPlayers, i )
                   return
                end
             end
          end
       end
    end
     
    function et_ClientDisconnect( clientNum )
       for i, num in ipairs( alliedPlayers ) do
          if num == clientNum then
             table.remove( alliedPlayers, i )
             return
          end
       end
       for i, num in ipairs( axisPlayers ) do
          if num == clientNum then
             table.remove( axisPlayers, i )
             return
          end
       end
    end
    
  2. Are you sure you don't have any non-standard pk3 files somewhere inside silent or etmain folder? Server admins often pollute those directories with their own stuff. If they change the weapon config file or even the weapon model it might happen that the weapon animation is broken. Please check that first. Meanwhile I will watch the demo too and let you know if I notice anything.

  3. If you want to add new weapons you have to edit the sources as well. We are the closed source mod so it's not possible to add new weapons as the source code is not publicly available. The only thing possible is to modify already existing weapons by changing the models and configuration files but rather only for own personal purposes.

  4. Have you had nitmod maybe? I know they have something like that: g_medics cvar.
     

     

    g_medics
    Bitflag to modify Medic class behaviour.
    1: Medics can’t pick up their own med packs at all
    2 : Medics can't get akimbo
    4 : Medics can't carry or pickup a SMG
    8 : Medics can heal teammates with their revive syringes.
    16 : Level 5 First Aid skill will allow players to regenerate HP in all classes (except medic class if the flag 32 is set)
    32 : Medics don't regenerate HP at all
    64 : Medics regenerate normal HP at 2HP/second and extra HP at 1HP/second
    128 : Medics regenerate normal HP at 1HP/second and don't regenerate extra HP at all
    Default: 0

     

  5. If I remember correctly, the limit is not dictated by some special reason, so the number could be increased probably. Today's computers don't have the memory limits as it used to be in the times of the game creation. The memory eaten by the sound definitions is eaten out of the hunkmegs, so the voice chat number increase would influence that. We will take a look into it. However, if the engine limits it somehow, there is nothing we can do in that matter.

  6. because while sniping everyone is leaning all the time very hard to kill or anything, make's the game kinda boring

     

     

    Okay, so then I don't understand what Dookie is asking for here.   If a sniper is shooting, he is exposed to fire himself.

     

    I think they are all hiding and leaning so nobody is exposed ever :P

  7. could you send me your server config of the 0.8.2 and point me to the pk3 files of your server so that I could try reproducing the problem locally?

  8. silEnT was not meant to be a replacement for ETPub

    TRUE, we just based our work on etpub version, but it has never been our intention to become the next version of etpub or successor of it. Please stop naming our mod as the etpub continuation or so, it has never been meant to be so.

  9. silEnT mod version 0.8.2 is out!

    Download

    Change log:

    Version 0.8.2

    Added: g_goatSound server cvar to enable/disable goat sounds on knife kills.
    Added: enemy team objective carry indicator (http://mygamingtalk....reen-indicator/). Use g_misc flag 1024 to enable it on the server and cg_objcarry client cvar to enable it in the HUD.
    Fixed: Players carrying objectives are now shown correctly.
    Fixed: !useredit was not able to set level higher than 99 when executed as rcon. !setlevel was working correctly.
    Fixed: The name of the disguised covert op was not drawn to spectators.
    Fixed: The class icon in the crosshair player name to be the current class instead of the latched class.
    Fixed: wm_sayPlayerClass now announces the latched class correctly, even when using class swithcer.
    Fixed: If map voting was enabled but g_mapVoteFlags 4 was not enabled. It was possible to issue multiple votes by hand using /mapvote command.
    Fixed: debriefing screen buttons didn't handle highlight theme parameter properly.
    Fixed: The output of finger command didn't show warnings if there were more than 2 in total.
    Fixed: UI crash in menu (http://mygamingtalk....rashes-in-menu/)
    Fixed: Minor bug with g_maxPanzerSuicides introduced in 0.8.0. If panzer suicides were disallowed completely, the player was not informed about it.
    Fixed: g_muteRename allowed to change the name when player used /reconnect (http://mygamingtalk....g-g-muterename/)
    Fixed: When unmuting/muting during intermission/warmup, the mute wasn't saved.
    Fixed: cg_effectDistance was affecting the played sounds.
    Fixed: g_classWeapons not working for class command (http://mygamingtalk....-fully-working/)
    Fixed: class command not handling secondary weapon parameter properly, it didn't influence the limbo menu, e.g. /class s 3 2 wouldn't select akimbo pistols or SMG as secondary in limbo.
    Fixed: switching problem with double SMG (http://mygamingtalk....aving-two-smgs/)
    Improved: If player is completely dead in the game, the scoreboard shows the player's latched class to other team members.
    Improved: UI tabbing to edit field makes it focused.
    Improved: limbo weapons menu for soldier class.
    Improved: sort order of the map vote menu map list.


    Download

    Enjoy!

    silEnT mod team

    Click here to view the article

  10. OK, I think I know what you want to achieve :) You want to add your server pk3 to the etmain directory so that players who start et can get the menu to your server right away, right?

    Such case is not be possible without manual modifications done in the ET installation directory by the players themselves.

  11. You simply need to prepare a separate pk3 file with the directories and menu files overriding the menu files of the mod.

    Create pk3 with:

    directory "ui" and inside the .menu files you want to change or add.

     

    And name the file zzz(...) _something.pk3 so that it's loaded last, if I remember correctly.

×
×
  • Create New...