Closed MattNF closed 8 years ago
I think removing fog should be sufficient, but that's also not a bad idea. Again, I'm not totally sure how to enable this.
mat_fullbright 1
No shit, I mean how do you get a client to run a cheat CVAR.
:^)
jacob probably knows.
is this a clientside or serverside cvar?
I believe it can be set by either. It's not replicated, so likely it can be used clientside.
I think what you are looking for is in my tank melee plugin, you can turn cheats on for one command, do a force client command then turn it off
new flagsgive = GetCommandFlags("give");
SetCommandFlags("give", flagsgive & ~FCVAR_CHEAT);
FakeClientCommand(client, "give %s", weaponname);
SetCommandFlags("give", flagsgive|FCVAR_CHEAT);
That's what I was picturing, too. Good to know it works.
Mat_fullbright 1 is clientside, fyi. The other command to add would be fog_enable 0.
I'm game to do this one, my plate is relatively clear.
@HighCookie It's not changing the cvar or the cvar flags ._. halp https://gist.github.com/jbzdarkid/412af9dc788fe72903a3
If the cvar is client side you have to use clientcommand instead of fakeclientcommand. Currently at the gym, I'll have a look at link when I'm home
FCVAR_SERVER_CAN_EXECUTE prevented server running command: mat_fullbright FCVAR_SERVER_CAN_EXECUTE prevented server running command: fog_enable caster_addons.sp(52) : error 017: undefined symbol "FCVAR_SERVER_CAN_EXECUTE"
Also, fog_enable is a client-only cvar, so I can't find it with FindConVar() to change its flags.
I'm not really sure what you should do then, Ive only used client command to do non-cheat things like play sounds to the client.
clientcommand("play bleep.wav");
There's a way on the internet to allow clients to run cheat commands, see here. That might be usable, in some form. The relevant command is SendConVarValue.
We can always just enable cheats and let the casters set fog_enable and mat_fullbright themselves. Edit: Got that bit working, not sure how safe it is.
https://forums.alliedmods.net/showthread.php?t=81101?t=81101
from what I've been readying you can strip the cheat flag off the cvar and then change it, or thats what's being suggested.
not sure if the source to that plugin will be any use,
nevermind thats just commands as well and not cvars, although I have seen a post saying that you can strip the cheat command off a cvar. It just didn't give any indication how
You can strip FCVAR_CHEAT off a cvar, but only server-side ones. The issue being that mat_fullbright and fog_enable are not server-side.
There is no way of executing commands or changing cvars on the client on modern branches of the Source engine, except for a few whitelisted commands. Aside from that, FakeClientCommand() can be used for serverside commands such as those added by various Sourcemod plugins.
If it were as simple as you think, this would had become a major security risk. Allowing the server to fully control each and every random cvar on the client is a terrible idea, and they got rid of the remaining games affected by it cca ~2010.
The solution to this problem lies beyond Sourcemod. I will provide it a little later.
mat_fullbright 1; fog_override 1; fog_enable 0
Also, I got banned when I used these, how do I make SMAC ignore these cheat vars?
SMAC is banning me because I don't match the server-defined value for sv_cheats. I can use smac_removecvar to get rid of the tracking on sv_cheats, which is ehhh but will work. Looks like fog_enable is also listed.
SMAC could also be used in place of the thirdpersonshoulder block we have, there's an smac_addcvar.
I have a "functional" version which simply allows casters to use cheats. N.B. SMAC still verifies some cheat cvars, I'd encourage people to only use mat_fullbright, fog_disable, fog_override, and mat_postprocess.
Since this isn't turning cheats on on the server, I don't foresee any exploits, but please tell me if possible.
Cast, change cheat cvar, uncast, profit
Cheats are turned off whenever you join team
On Oct 8, 2015, at 3:53 PM, Attano notifications@github.com wrote:
Cast, change cheat cvar, uncast, profit
— Reply to this email directly or view it on GitHub.
This tries to target bots, which throws an error. IsFakeClient() pls.
I never committed the source for this, nobody caught it, I deleted my local copy. Will rebuild asap, if you could inform server owners @jacob404
You do realize that removing sv_cheats from the list of tracked cvars is a major security risk, right? There are plenty of sv_cheats bypassers, and this approach renders SMAC impotent against them.
While this thing works, I highly discourage you from including it in Promod. The price is just too big, and xbye's tears definitely aren't worth it. If @jacob404 decides to anyway, make sure to let every server admin on the forum know what they're signing up for.
@jacob404 @Attano Do either of you know where the source for smac_cvars actually is? I can find some old copies, but I don't see any that look official.
Note to self to update smac_cvars and implement BAN_IF_NOT_CASTER.
3fe53cd
Watching the Dead Air matches from RBT was really painful... some areas are completely pitch black and you see nothing but the glows.