Jump to content

Zelly

Coders
  • Posts

    142
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by Zelly

  1. Ok thank you. Going to send the script over to tweek to see if he has anything wrong.
  2. It appears so. I couldn't notice anything strange.
  3. What I have so far... But my total is much higher than csinfo which is what you mean by "The total MAX is something like half of the total space (all strings combined), for some weird and unknown reason, if I remember correctly." My total was 7081 while csinfo said 4089 local _writetofile = function(line) -- append to csinfo.log if not line then return et.G_LogPrint("Line empty\n") end local status,f,err = pcall(io.open,"csinfo.log","a") if not f then return et.G_LogPrint(err .."\n") end if not status then return et.G_LogPrint(f .."\n") end f:write(line) f:close() end local _ljust = function(s,l,sep) --- Justify to left if not s then s = "" end if type(s) ~= "string" then s = tostring(s) end if not l then return s end if not sep then sep = " " end if s:len() == l then return s end l = l - 1 for k=s:len() , l do s = s .. sep end return s end function et_ConsoleCommand( cmd ) local Arg0 = string.lower( et.trap_Argv(0) ) if Arg0 == "getcsinfo" then local LOG_WITH_ZERO_LENGTH = false local cs = { } local MAX_CONFIGSTRINGS = 1024 local total_length = 0 local Arg1 = string.lower( et.trap_Argv(1) ) if Arg1 == "true" then LOG_WITH_ZERO_LENGTH = true end for cs_index=1, MAX_CONFIGSTRINGS do local cs_str = et.trap_GetConfigstring( cs_index-1 ) -- index is -1 since it starts at 0 local cs_len = cs_str:len() total_length = total_length + cs_len if cs_len > 0 or LOG_WITH_ZERO_LENGTH then cs[#cs+1] = _ljust(cs_index-1,4) .. " | " .. _ljust(cs_len,4) .. " | " .. cs_str end end _writetofile("\n\n" .. os.date("%c") .. " " .. et.trap_Cvar_Get('fs_game') .. " " .. et.trap_Cvar_Get('mapname') .. "\nTotal length: " .. total_length .. "\n") _writetofile(table.concat(cs,"\n")) et.G_LogPrint("Total length: " .. total_length .. "\n") end endAnything you notice that is off?
  4. I do have a sets LuaESMod to the version number so I can see it on gametracker. But that has been in there since the beginning. Is there a way to see the full output of the gamestate? Maybe I could look for something that would be a little off. I know of csinfo but that just tells me the length.
  5. Ok thank you, the only reason I thought there was a link is because of the forcecvar and sv_cvars take up csinfo if I remembered correctly. Am not sure what else it could be, besides the pk3s.
  6. So first time I have used this. Don't know really the side effects of using this. I am using et.G_QueryClientCvar() r_mode and r_customwidth and r_customheight to get an estimation on how many characters can fit in a client's console. The reason I am coming here is I am trying to figure out if my lua is taking up of the MAX_GAMESTATE_CHARS because Tweek reported many of his players are getting kicked after latest update. He does have a lot of maps, but hasn't added any for a while, and only started getting kicked after the update. So my question is can et.G_QueryClientCvar cause a spike in maxgamestatechars or something else in lua perhaps, I don't think I made any other major changes that could have caused this spike. Also it goes to cheat.log when it does a query, is there some way to disable this so it doesn't fill up that log.
  7. File Name: Lua Enhanced Server Mod File Submitter: Zelly File Submitted: 29 Mar 2015 File Category: LUA Lua Enhanced Server Module or LuaESMod or LESM for short, is a server side mod written in lua which aims to provide many features for server admins and their players. It can be used with various mods that support lua 5.1 and up. Wiki Click here to download this file
  8. Version 2.7.5c

    368 downloads

    Lua Enhanced Server Module or LuaESMod or LESM for short, is a server side mod written in lua which aims to provide many features for server admins and their players. It can be used with various mods that support lua 5.1 and up. Wiki
  9. This may sound silly... but is there a way to keep the nextmap cvar set to the nextmap when I use map command in rcon. on the first map in my cycle: ]nextmap "nextmap" is: "vstr d2" default:"" map adlernest ]nextmap;g_gametype "nextmap" is: "map_restart 0" default:"" "g_gametype" is: "6" default:"4"
  10. If we are talking about just obituary here, I do believe it is possible with lua. I am not 100% sure though, I have not done much testing in that section of lua.
  11. set sv_wwwDlDisconnected 0I think. As for the second problem I don't think so. I recommend installing ET Outside program files then you don't have that problem. But again somehow you need to get that to your players. This problem comes up so often usually most players can figure it out with google. It is still best if you have a clan website to make it easy for people to find the solution.
  12. Aha no matter how many times I do that I always get it wrong
  13. Hmm... to fix warmup xp gain is pretty simple just check gamestate I always forget the correct number though. I think it is this: local gamestate = tonumber( et.trap_Cvar_Get('gamestate') ) if gamestate == 1 then -- do xp stuff here. end So are you saying it gives xp to players that have more than 1000 xp every spawn? or Just once.If it is just once then I assume it is related to a small bug, where xp from lua is 0 until at least one xp is gained: http://mygamingtalk.com/forums/topic/3346-lua-get-xp-value/ I would have to do some more testing my self again to verify a good method to get xp in lua, I forget which method I normally use. Try this: (Disclaimer this is off the top of my head not sure if this is right) function getXP(clientNum) local xp = 0 for k=0, 6 do xp = xp + tonumber(et.gentity_get(clientNum,"sess.skillpoints",k)) end return xp end Hope that helps, I didn't do any fact checking.
  14. Not 100% sure. Related topic? http://mygamingtalk.com/forums/topic/3552-in-game-menu/
  15. I am curious if all your trying to accomplish is to have players start with all skills then I think it would be easier to just set the skill levels to 0. http://mygamingtalk.com/wiki/Silent_Mod_Server_Cvar#skill_soldier You then wouldn't need to bother with lua, everyone that joined would automatically have the skill levels. In your server config: set skill_soldier "0 0 0 0" set skill_medic "0 0 0 0" set skill_engineer "0 0 0 0" set skill_fieldops "0 0 0 0" set skill_covertops "0 0 0 0" set skill_battlesense "0 0 0 0" set skill_lightweapons "0 0 0 0" However if you wanted to do this for some newer players that like receiving xp.You are trying to concatenate a string into where you are supposed to be supplying an integer(the client number) Try this: function setskill(playerID) local name = et.gentity_get(playerID,"pers.netname") if isBot(playerID) or noGuid(playerID) then return end et.G_AddSkillPoints(playerID, 0, 500) et.G_AddSkillPoints(playerID, 1, 500) et.G_AddSkillPoints(playerID, 2, 500) et.G_AddSkillPoints(playerID, 3, 500) et.G_AddSkillPoints(playerID, 4, 500) et.G_AddSkillPoints(playerID, 5, 500) et.G_AddSkillPoints(playerID, 6, 500) et.G_AddSkillPoints(playerID, 1, 500) et.trap_SendServerCommand(-1,"chat \"^nCongratulations ^7"..name.."^n, ^nyou have ^nbeen ^nEXP! Welcome to MC ! \"") -- et.trap_SendConsoleCommand( et.EXEC_APPEND, "readconfig\n" ) -- Pretty sure you don't need readconfig in this situation end Also you are sending your congratulations message to everyone that is connected. Not sure if this is intended or not, if not replace -1 with playerID Hope that helps, btw if you can check your console log around the time the map is getting loaded it will show if there are any errors when loading your lua. They are usually pretty useful when trying to pinpoint what is wrong.
  16. Yeah was hoping the logs could give a little more information to what is going on.
  17. Try posting your console log for the sniper map between: ------- Game Initialization ------- and *=====INITIALISING USER DATABASE That will tell us if your custom mapconfig is getting loaded. I made a quick test server with UJE_jungle_sniper_b3.pk3 default.cfg set g_sniperwar 0 UJE_jungle_sniper.cfg set g_sniperwar 1 That worked.
  18. We just mean, if the core lua that has the et_CallBacks in it requires a extra lua module. Example: etdir/silent/luascripts/main.lua <-- File that has et callbacks etc. that we want loaded, it also had a line like require "util.json" or something similar. etdir/silent/luascripts/util/json.lua <--- File that we wouldn't want to be loaded to ET Obviously we wouldn't want et to load json.lua, as there would be no et callbacks in it and it would be loaded via main.lua already. In other words it doesn't apply only to my project. Usually it is just one file but not always.
  19. To be fair, he was asking about the C API part which I don't know about But yes, if it loads all lua files recursively that would be bad for projects like myn.
  20. package.path and package.cpath local mod_path = string.gsub( et.trap_Cvar_Get("fs_basepath"),"\\","/") .. "/" .. et.trap_Cvar_Get("fs_game") .. "/" package.path = package.path .. ";" .. mod_path .. "luascripts/?.lua" That is what it looks like in lua. I think this is what you want. (Changing it in in the c api, may be different though im not sure)
  21. I am having some issues blocking some shrubbot commands, sometimes... I don't understand why its happening Here is where I am at, shouldn't need to understand what all this does just the return part: function et_ClientCommand( clientNum , cmd ) ... if CommandHandler:Command(Client,"chat",CommandName:gsub(Config.Prefix.Chat,"",1),Args) == 1 then -- Check return output of command Console:Debug("et_ClientCommand chat command return 1" ,"command") -- I get this message return 1 -- should stop command here? else -- doesn't get here. local CommandName,Args = CommandHandler:getArgs(et.ConcatArgs(0),0) return CommandHandler:ChatFilter(Client,CommandName,table.concat(Args," ")) end ... end I do !warn or !warn zel it does my command like expected , but it does warn shrubbot command BEFORE my command. I get my debug message fine which to mean the clientcommand should be returning 1, meaning it shouldn't run the warn command. I do a similar styled command !list all and it does not run the shrubbot command like expected. It has got to be something I am doing wrong, since I did a quick test lua and return 1 for just warn command there and it blocked the command. Possible I am just overlooking something really simple, will update if I find it. In meantime help would be appreciated. Image of output: http://gyazo.com/313e4f4ee8f659ec4d3b6ec2bdcbf68f.png
  22. Not true, I have my dynamite counter in LESM it works on defuse as well. *On most it does, I have noticed a few barriers such as goldrush ga second tank barrier doesn't print the Dynamite Diffuse message
  23. Just FYI Noticed your redirect has silent mod folder inside etmain, it needs to be outside etmain. http://periax.bplaced.net/etmain/silent/ should be move to: http://periax.bplaced.net/silent/
  24. You need flag 2 of this cvar I think. There is also a /playerrating command (flag 2) of this cvar:
×
×
  • Create New...