Raised This Month: $51 Target: $400
 12% 

sv_cheats per player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-07-2007 , 11:54   sv_cheats per player
Reply With Quote #1

Hello dudes,

I wanted to ask if someone knows a way to enable sv_cheats per player,
there are some commands that are pretty useful for admins, but when
I enable sv_cheats everyone is noclipping and spawning airboats and stuff...
I guess you would have to hook that function that checks the CHEAT flag
of every cvar.

Thanks to everyone who replies.

Greetings Berni
berni is offline
KMFrog
Senior Member
Join Date: Oct 2007
Old 12-07-2007 , 12:09   Re: sv_cheats per player
Reply With Quote #2

which commands do you need to use?

some cheat commands do not need sv_cheats 1 if they are sent from the server
KMFrog is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-07-2007 , 21:47   Re: sv_cheats per player
Reply With Quote #3

Commands like ent_remove don't work on the server, as the server needs to know where you are looking at.
And then all the impulse commands, that give you items and spawn something. and allot more like special entity screen for debugging purposes.
berni is offline
KMFrog
Senior Member
Join Date: Oct 2007
Old 12-07-2007 , 21:54   Re: sv_cheats per player
Reply With Quote #4

Removing an ent:
http://docs.sourcemod.net/api/index....ad=show&id=62&

Find what the client is looking at:
http://docs.sourcemod.net/api/index....d=show&id=179&

Giving players items:
http://docs.sourcemod.net/api/index....ad=show&id=36&

and what do you mean by "special entity screen"?
one of the client-side debugging render modes?
KMFrog is offline
ThatGuy
Senior Member
Join Date: Nov 2007
Old 12-07-2007 , 22:57   Re: sv_cheats per player
Reply With Quote #5

I must ask, are you asking for this for tf2?
ThatGuy is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-08-2007 , 00:15   Re: sv_cheats per player
Reply With Quote #6

Quote:
Originally Posted by KMFrog View Post
Removing an ent:
http://docs.sourcemod.net/api/index....ad=show&id=62&

Find what the client is looking at:
http://docs.sourcemod.net/api/index....d=show&id=179&

Giving players items:
http://docs.sourcemod.net/api/index....ad=show&id=36&

and what do you mean by "special entity screen"?
one of the client-side debugging render modes?
Hey I think you missunderstood my question, my question is if there is a way to enable sv_cheats per player, not how to recreate every single of the 200 commands. I know how to do that.
Yes I meant the entity information overlay.
And no, I need it for hl2dm.
berni is offline
BAILOPAN
Join Date: Jan 2004
Old 12-08-2007 , 11:06   Re: sv_cheats per player
Reply With Quote #7

sv_cheats can't be enabled per-player for client-side functionality. For example, there are server-side commands that clients can use which are marked as SV_CHEAT -- for those commands, the flag can be stripped or toggled. But for client-side functionality, they use the fact that sv_cheats is a replicated cvar and the checking is done client-side.
__________________
egg
BAILOPAN is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-08-2007 , 15:53   Re: sv_cheats per player
Reply With Quote #8

Quote:
Originally Posted by BAILOPAN View Post
for those commands, the flag can be stripped or toggled.
How can I modify the cvar FLAGS ?

Quote:
Originally Posted by BAILOPAN View Post
f
But for client-side functionality, they use the fact that sv_cheats is a replicated cvar and the checking is done client-side.
But the client needs to know if sv_cheats is enabled on the server or not, or am I wrong ?
berni is offline
BAILOPAN
Join Date: Jan 2004
Old 12-09-2007 , 11:10   Re: sv_cheats per player
Reply With Quote #9

Yes, sv_cheat is replicated to all clients (that is, if you change its value on the server, it will change it on all clients). It may be possible to send network messages to trick clients into getting certain values for it, but you cannot block client-side cheat vars no matter what.

You can modify server-side variables with Get/SetConVarFlags.
__________________
egg
BAILOPAN is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 12-10-2007 , 06:51   Re: sv_cheats per player
Reply With Quote #10

Ok thanks, I got a view into how that works now.

Edit: Ok, I just have to take a look at the native function SetConvarInt, see how it works and replicates the convar to the clients, and then create my own native function that is able to replicate convars for specific clients

Last edited by berni; 12-10-2007 at 07:03.
berni is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode