-
Posts
117 -
Joined
-
Last visited
-
Days Won
16
Content Type
Forums
Profiles
Events
Gallery
Downloads
Articles
Posts posted by Sol
-
-
Thanks a lot, great release as always.
-
Thank you
And how do you add more commands operating in the same way?
in CVARNAME?
No, you have to add another cvar for it, but there's no point doing it in such a way.
You sould use MySQL or file
-
It can not be used like this way, you have to storage value somewhere.
The best way to storage values is MySQL or Filesystem but its more advanced.
You can do this instead:
CVARNAME = "storage" function et_InitGame( levelTime, randomSeed, restart ) if et.trap_Cvar_Get( CVARNAME ) == nil then et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("seta %s 0\n", CVARNAME )) end end function et_ClientCommand( num, cmd ) if cmd == "blabla" then if tonumber(et.trap_Cvar_Get( CVARNAME )) == 0 then -- Enable something et.trap_Cvar_Set(CVARNAME, 1) else -- Disable something et.trap_Cvar_Set(CVARNAME, 0) end end end
-
Hi,
Maybe I see a problem with !passvote :
I connect, we are two players, I launch [50pct bot] vote, the other guy ignore the vote, so I use "rcon !passvote", it prints in console something like "referee passed poll" in blue, but no bots come.
PS: of course it works when vote is passed normally
I will try to reproduce it
This message "referee passed poll" is not included into LUA script.
There is a method to read cvars from the clients.
Ah yeah, so there is solution. Thanks
-
Can you provide an example that will succesfully spoof this
if string.sub(text,1,19) == "Vote Passed: [poll]" then
Also, I don't know how to substitute et_Print with et_ConsoleCommand in this script, could you be more specific on how the passed poll vote can be captured with it.
If there are issues, a new lua hook could be introduced to solve them.
I don't know exactly how to spoof it but I seen warnings by coders in other lua scripts, for example player could just type (name "myname\nVote Passed: [poll]") it will probably jump to next line inside consoleprint log.
Here is an example of what you asked for:
function et_ClientCommand( num, cmd ) if string.lower(et.trap_Argv(0)) == "callvote" then -- first arg -- other arguments... et.trap_Argv(x) end end
but it requires always to return true at the end otherwise command won't be executed
( what is interesting by this you can pass some informations from custom UI windows by this vote and always return false at the end to stop executing, then vote won't appear !!this is only way to pass informations by this _trap!!! I asked you already to create custom _trap to pass informations from clients's UI but its not implemented yet )
( it is also spoofable, normal user can just send command by console "callvote quote Vote Passed: [poll]timelimit+5" it also requires to check if this vote is on the fly )
-
Good job, but I see one small issue.
all informations can be spoofed by players inside (function et_Print( text )) imo, but there is another way to do that and simpler way.
et_ConsoleCommand() callback is exactly like et_ClientCommand() but it works for server console, u can use also et.trap_Argv( x ) function to handle incoming arguments.
just a small suggestion.
-
Yeah, The engine must be restarted every 28 days otherwise time will be bugged.
-
Nah its not fixed, when it occours it doesnt kick you for that invalid guid error, it gives connection interrupted, and you need to manually reconnect or quit. So its not fixed
As I told you, its kind of test fix I didn't test it really. I have no idea how to fix it for now, all of weird things are on the side of mod. But anyway this bug is a droplet in the bucket of problems because its just only about a few secs while client can't connect to server.
-
Yes, I fixed it but it's test fix, forgot to update changelog but soon will be big changes
-
You could also add "+set fs_game silent" as parameter inside Xfire's wolfenstein adv settings in "additional parameters line" but of course it will works only for silent servers.
-
The avatars over players's head is useless imo but avatars on players's helmet, medpack, weapons instead of original icons, class levels etc, like in COD:BO are really funny but it's a lot of work with render I guess. To prevent abusing it, the avatars could be selected in such a limbo menu and admins can upload additionals avatars to their servers by pk3 packs.
-
Also you can make a map configs for these "fun" maps, where you can enable !crazygravity. This should be simpler than LUA
It can't be as far as I know.
here you are the script, I'm not quite sure about et_InitGame and restart eq 1 if it is a call before or after map_restart.
maps = { "adlernest", "fueldump", "goldrush" } -- add map here command = "!crazygravity" -- command here function et_InitGame( levelTime, randomSeed, restart ) if restart == 1 then -- not quite sure local i = 1 while maps[i] ~= nil do if tostring(et.trap_Cvar_Get("mapname")) == maps[i] then et.trap_SendConsoleCommand(et.EXEC_APPEND, string.format("%s\n", command)) break end i = i + 1 end end end
-
LOL.
if cheat == 1 then ban end
"cheat cvar" I mean "cheat protected cvar" like cg_gunx or cg_thirdperson for this it's not always necessary to ban.
-
Yes, Ineed I already asked about this feature before. In my opinion it would be good to add to lua new function like et.ForceCvar( clientnum, cvar, value ) just to force target client's cvar.
For example, If my lua script detects (cheat cvar) I can't force it off, I just have to force this cvar for all active clients.
You could use ET 3.00 or ETENG, I just buildin to them rconfilter, If you enable this only some ip will be able to use rcon.
-
You don't need to use et_ClientConnect callback to check sess.sessionTeam state it's useless imo, there is another callback for that "et_ClientBegin". Also if you want to check bots just check their ping for ex:
function et_ClientBegin( clientNum ) if et.gentity_get( clientNum, "ps.ping" ) ~= 0 then -- stuffs end end
-
The team command is sent from the client only when they press ok button from the limbo panel or use it directly from the console.
As Gaoesa said, you just need to check for 'team ...' command and then
function et_ClientCommand( clientNum, command ) if command == "team" and et.trap_Argv(1) ~= "s" then et.gentity_set(clientNum, "sess.shoutcaster", 0) return true elseif command == "team" and et.trap_Argv(1) == "s" then et.gentity_set(clientNum, "sess.shoutcaster", 1) return true end end
Now client will able to join the team and he will also be able to be shoutcaster again if he go to the spectator.
-
It's really interesting, I did it before but it didn't worked.
Good job! but you have to fix LUA comments like --[[ comment ]]--
-
et.gentity_get(slot, "ps.ping") < 999 and et.gentity_get(slot, "ps.ping") > 0 seems good
-
However, I think there is another bug related to this. Occasionally, a client will disconnect, but I can still pull all of their gclient information from the slot number as if they are still on the server.
Yes, this is bug indeed probably related with zombie_time/timeout that Disconnect callback is not executed sometimes.
-
Oh, so you do both the et_ClientCommand() and the et_ConsoleCommand() in the same script and only use the et_ClientCommand() function to set the clientNum? I suppose then you would want to return 0 in the et_ClientCommand() so it doesn't appear to be a valid command to the client? And in your example, shouldn't it be et.trap_Argv(0) instead of et.trap_Argv( 1 )?
Yes, but anyway better to make your own shrubbot for commands etc. than this because of comfort.
My solution solves this problem but its not good enough, you can't be sure about clientnum completly in this case.
-
Like I said, you have to use 2 parametrs or just get it from et_ClientCommand() callback.
for example:
clientnum = 0 -- global variable!!! function et_ClientCommand( num, cmd ) -- for example, sayname is also simillar command ( !sayname ) if et.trap_Argv( 1 ) == "!sayname" then clientnum = num end end function et_ConsoleCommand(command) if et.trap_Argv(0) == "sayname" then if et.trap_Argc() == 2 then local targetSlotNum = et.trap_Argv(1) local targetName = et.gentity_get(targetSlotNum, "pers.netname") local clientNum = clientnum et.G_Say(clientNum, et.SAY_ALL, targetName) else -- Error: Need two parameters end return 1 end return 0 end
but it works for !sayname command only, you can also check for last client who used command like:
function et_ClientCommand( num, cmd ) -- check for silent commands too if string.find(cmd, "!") or string.find(et.trap_Argv( 1 ), "!") then clientnum = num end end
-
I know about the custom commands already... I was actually asking about the calling a lua function through the exec line like in your example. Is that functionality available currently?
something like this
[command] command = ammo exec = lua ammo desc = bla bla bla levels = 0 1 2 3 4 5
function et_ConsoleCommand( cmd ) -- <-- there is a cmd if cmd == "lua" then -- commands here if et.trap_Argv( 1 ) == "ammo" then et.gentity_set( tonumber(et.trap_Argv( 2 )), "ps.ammo", tonumber(et.trap_Argv( 3 )) ) -- it needs 2 extra parametrs or just use et_ClientCommand callback end end end
-
Just out of curiosity, I am guessing that et_ConsoleCommand() intercepts rcon commands and server console commands? Would this mean you would be able to also run the Lua script through rcon?
What do you mean exactly, et_ConsoleCommand() callback is looking for cmds via rcon only.
I was thinking something like this:
[command] command = example exec = mycommand param1 param2 desc = Invoking Lua from custom commands levels = 0 1 2 3 4 5
And in the Lua script somthing like
function et_ConsoleCommand() -- check if it is a command to intercept -- if so, read parameters and execute the associated Lua functions end
Yea, this is nice idea too.
-
=F|A=Annibal had this idea and I tough it would be good to share.
Would it be possible to enable r_shownormals when logged as a shoutcaster ?
Of course shoutcaster is only usable as spec so it wouldn't give advantage to anyone.
IMO it is not a so important feature but it could help finding cheaters.
The best way to get a final opinion is always a demo but it could help when specing players randomly.
I don't know how much time it would need but I'm still suggesting.
r_shownormals is already an integrated feature so pershap it is easier to do?
Like only triggering the cvar when logged as shoutcaster?
ty guys
It's impossible without detour cvar's protection.
It can be done by forcing r_shownormals cvar, but you will force it to all clients, devs could implement that function into LUA, that would be nice to force cvar to target client
silEnT release 0.8.0
in Front Page News
Posted
Just use * to spoof * info or just install * * * *
For sure it will be inevitable on heavily malicious computers I guess so