Jump to content

loudness

Members
  • Posts

    13
  • Joined

  • Last visited

  • Days Won

    3

Reputation Activity

  1. Like
    loudness got a reaction from Jhonny/Shinobi in hstats flag   
    i find it..sorry... is stats flag
    tks anyway
  2. Like
    loudness got a reaction from Chuckun in Will this LUA work? (Novice needs help :P)   
    ----------------------------------------------------------------------
    -- Filename: myguid.lua
    ----------------------------------------------------------------------
    -- MyGUID - Prints your silEnT GUID just like /cl_guid would for etkey based GUIDs.
    ----------------------------------------------------------------------
    -- Created by =F|A=Chuckun
    -- If you use it, please donate to our clan to help fund the servers
    -- Any amount will help!!
    -- Fearless-Assassins.com
    ----------------------------------------------------------------------
    -- For use with shrubbot, exec 'getmyguid'
    ----------------------------------------------------------------------

    description = "silEnT GUID Command"
    version = "1.0"   -- is not used in any function


    function et_InitGame(levelTime,randomSeed,restart)
        local modname = string.format("%s", description)
        et.G_Print(string.format("%s loaded\n", modname))
        et.RegisterModname(modname)
    end



    function et_ConsoleCommand(clientNum, command)
        if et.trap_Argv(0) == "getmyguid" then
               local guid = et.Info_ValueForKey(et.trap_GetUserinfo(playerID),"sil_guid")
               et.trap_SendServerCommand(clientNum, "print \"^osilEnT GUID: ^7"..guid.."\n")    return 1  ---return 1 here...if  not have getmyguid comand will be 0..unreconize comand 
       end
    end
     
     
    im begginer too...usualy i hunt logs for errors ....but i thik like this will work  
    gaoesa solution is better no lua
  3. Like
    loudness got a reaction from hellreturn in list maps command in shrubbot   
    Version = 1.0 ------------------------------------------------- function et_InitGame(levelTime,randomSeed,restart) et.G_Print("[Nextmap] Version:"..Version.." Loaded\n") et.RegisterModname("Nextmap Announce") end ------------------------------------------------- samplerate = 290000 --300000 map1 = "supply" map2 = "oasis" map3 = "goldrush" map4 = "radar" map5 = "tc_base" map6 = "et_beach" map7 = "frostbite" map8 = "sp_delivery_te" map9 = "adlernest" map10 = "bremen_b2" map11 = "braundorf_b4" map12 = "et_ice" map13 = "goldrush-ga" map14 = "railgun" map15 = "dubrovnik_final" map16 = "sw_battery" map17 = "et_village" ------------------------------------------------- function et_RunFrame( levelTime ) if math.mod(levelTime, samplerate) ~= 0 then return end mapname = et.trap_Cvar_Get( "mapname" ) if mapname == map1 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map2.."\n\"" ) elseif mapname == map2 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map3.."\n\"" ) elseif mapname == map3 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map4.."\n\"" ) elseif mapname == map4 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map5.."\n\"" ) elseif mapname == map5 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map6.."\n\"" ) elseif mapname == map6 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map7.."\n\"" ) elseif mapname == map7 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map8.."\n\"" ) elseif mapname == map8 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map9.."\n\"" ) elseif mapname == map9 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map10.."\n\"" ) elseif mapname == map10 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map11.."\n\"" ) elseif mapname == map11 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map12.."\n\"" ) elseif mapname == map12 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map13.."\n\"" ) elseif mapname == map13 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map14.."\n\"" ) elseif mapname == map14 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map15.."\n\"" ) elseif mapname == map15 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map16.."\n\"" ) elseif mapname == map16 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map17.."\n\"" ) elseif mapname == map17 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map1.."\n\"" ) end end function et_ClientCommand(client, command) local mapname = et.trap_Cvar_Get( "mapname" ) if string.lower(command) == "callvote" then if et.trap_Argv(1) == "nextmap" then if mapname == map1 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map2.."\n\"" ) elseif mapname == map2 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map3.."\n\"" ) elseif mapname == map3 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map4.."\n\"" ) elseif mapname == map4 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map5.."\n\"" ) elseif mapname == map5 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map6.."\n\"" ) elseif mapname == map6 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map7.."\n\"" ) elseif mapname == map7 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map8.."\n\"" ) elseif mapname == map8 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map9.."\n\"" ) elseif mapname == map9 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map10.."\n\"" ) elseif mapname == map10 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map11.."\n\"" ) elseif mapname == map11 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map12.."\n\"" ) elseif mapname == map12 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map13.."\n\"" ) elseif mapname == map13 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map14.."\n\"" ) elseif mapname == map14 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map15.."\n\"" ) elseif mapname == map15 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map16.."\n\"" ) elseif mapname == map16 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map17.."\n\"" ) elseif mapname == map17 then et.trap_SendServerCommand(-1, "chat \"^1Nextmap: ^3"..map1.."\n\"" ) end end end end  
     
    You can,t do this if you running mapvoting..but you can do something a announce like ..if nobody vote..nextmap will be...your mapvoterotation.cfg
     
    source for this script is http://bani.anime.net/banimod/forums/viewtopic.php?p=66730  and is working on silentmod
    cheers
  4. Like
    loudness got a reaction from Dragonji in even teams   
    Hello silent devs and all ppl around here...
    first ...sorry for my english...
    and .. i have a lua script active like 1 year on our silent server..and its works...if 1 team have 2 or more players avantage ...the script moves first plwyer who die from oponent team....i share whit you and i hope is help..credits for this script go to DMG Deevious
     
    -- [ Local Functions ] function GetPlayerGUID(client) local player_guid = et.Info_ValueForKey(et.trap_GetUserinfo(client), "sil_guid" ) if player_guid == "NO_GUID" or player_guid == "unknown" then return true end return player_guid end function GetPlayerName(client) return et.Q_CleanStr(et.gentity_get(client, "pers.netname")) end -- [ Wolf Callbacks ] function et_InitGame(levelTime,randomSeed,restart) et.RegisterModname("DMG Team Balance #1") players = { } players[0] = 0 --all players[1] = 0 --axis players[2] = 0 --allies players[3] = 0 --spectators end function et_ShutdownGame(restart) -- nimic end function et_Obituary(client, killer, death) local player_guid = GetPlayerGUID(client) local player_name = GetPlayerName(client) local game_state = tonumber(et.trap_Cvar_Get("gamestate")) local player_team = et.gentity_get(client, "sess.SessionTeam") if player_guid == nil then return nil end if game_state ~= 1 and game_state ~= 2 then players[0] = 0 --all players[1] = 0 --axis players[2] = 0 --allies players[3] = 0 --spectators for i=0, tonumber(et.trap_Cvar_Get("sv_maxclients"))-1, 1 do local teamnumber = tonumber(et.gentity_get(i,"sess.sessionTeam")) if et.gentity_get(i,"pers.connected") ~= 2 then else players[0] = players[0] + 1 players[teamnumber] = players[teamnumber] + 1 end end if (( (players[1] - players[2]) > 1 and player_team == 1 ) or ( (players[2] - players[1]) > 1 and player_team == 2 )) then -- Axis > allies si player la axis sau allies > axis si player la axis if player_team == 1 then -- player la axis - mut la allies et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. player_name .. " b") else -- player la allies - mut la axis et.trap_SendConsoleCommand( et.EXEC_APPEND, "putteam " .. player_name .. " r") end et.G_globalSound( "sound/loudness/teams.wav" ) et.trap_SendServerCommand(-1, "chat \"^1URAAA...^8 FII FERICIT ,^7 " .. player_name .. " ^8SERVERUL TE-A ^1SACRIFICAT ^8SI MUTAT IN SPIRITUL FAIRPLAY-ULUI! ^0DMG ^4FAIRPLAY ^8SCRIPT IN ACTION ... \"") et.G_globalSound( "sound/loudness/hurrah.wav" ) end end return nil end 
     
    is not perfect but teams are always even visualy(number of players) ....and now i need help to make a function or condition...i want to capture in lua the !howfair result...and use in script like condition....
    tks..
     
    btw - you must moodify this line for your server ..write anything you want there..and the sound
     
    et.trap_SendServerCommand(-1, "chat \"^1You have been moved  ,^7 " .. player_name .. " ^8tks for being fairplay \"")
    enjoy
×
×
  • Create New...