Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/12/14 in all areas

  1. hellreturn

    XP is not saved :(

    It would be based on your basepath and homepath. if you can drop me a PM with FTP access to your server I can fix it up for you in 5 mins. If access is not possible then check your console logs and see what path it's trying to load from. Your other settings are correct unless you are overwriting it again with different values in the config. Sometimes admins put same cvar in config couple of times which causes the issue.
    1 point
  2. hellreturn

    XP is not saved :(

    Looks like xpsave path might be wrong?
    1 point
  3. Purple

    balance.lua + sound

    modname = "balance" version = "0.1" function et_InitGame(levelTime,randomSeed,restart) et.RegisterModname(modname .. " " .. version) end unevenDiff = 2 max_unevenTime = 15 max_unevenDiff = 4 axisPlayers = {} alliedPlayers = {} unevenTime = 15 function et_RunFrame( levelTime ) local numAlliedPlayers = table.getn( alliedPlayers ) local numAxisPlayers = table.getn( axisPlayers ) if numAlliedPlayers >= numAxisPlayers + max_unevenDiff then if et.G_shrubbot_level(clientNum) >= 12 then return end local clientNum = alliedPlayers[ numAlliedPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " r" ) 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 ^1AXIS\"" ) elseif numAxisPlayers >= numAlliedPlayers + max_unevenDiff then if et.G_shrubbot_level(clientNum) >= 12 then return end local clientNum = axisPlayers[ numAxisPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " b" ) 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 ^4ALLIES\"" ) elseif numAlliedPlayers >= numAxisPlayers + unevenDiff then if unevenTime > 0 then if tonumber( levelTime ) - unevenTime >= max_unevenTime * 1000 then if et.G_shrubbot_level(clientNum) >= 12 then return end local clientNum = alliedPlayers[ numAlliedPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " r" ) 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 ^1AXIS\"" ) end else unevenTime = tonumber( levelTime ) end elseif numAxisPlayers >= numAlliedPlayers + unevenDiff then if unevenTime > 0 then if et.G_shrubbot_level(clientNum) >= 12 then return end if tonumber( levelTime ) - unevenTime >= max_unevenTime * 1000 then local clientNum = axisPlayers[ numAxisPlayers ] et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. clientNum .. " b" ) 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 ^4ALLIES\"" ) 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
    1 point
×
×
  • Create New...