Raised This Month: $ Target: $400
 0% 

Force developer 0


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
the1991
Junior Member
Join Date: Aug 2006
Old 04-23-2007 , 19:07   Force developer 0
Reply With Quote #1

I am new to scripting and I was wondering if it is possible to force clients to use certain cvars. I am interested in not allowing 'developer 1' on my server, so I am looking for something that automatically puts everyone at developer 0. Is it possible to do this? Is it difficult? Thanks!
the1991 is offline
Jheshka
Senior Member
Join Date: Dec 2005
Old 04-23-2007 , 22:50   Re: Force developer 0
Reply With Quote #2

Code:
public client_connect( id ) {     client_cmd ( "developer 0" ) }
__________________
James
Jheshka is offline
the1991
Junior Member
Join Date: Aug 2006
Old 04-24-2007 , 18:52   Re: Force developer 0
Reply With Quote #3

that command only blocks it when the client connects. any way to set it so the client cannot change it back after they have connected?
the1991 is offline
DarlD
Senior Member
Join Date: Aug 2004
Old 04-24-2007 , 19:05   Re: Force developer 0
Reply With Quote #4

you could create a loop
Code:
public client_connect(id) {      client_cmd("developer 0")      set_task(0.5,"loop") } public loop(id) {      client_cmd("developer 0")      set_task(0.5,"loop2") } public loop2(id) {      client_cmd("developer 0")      set_task(0.5,"loop") }
__________________
DarlD is offline
Send a message via MSN to DarlD
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-24-2007 , 19:13   Re: Force developer 0
Reply With Quote #5

lol DarlD. rofl why not do, use the set_task "b" for infinite checking .
Styles is offline
Send a message via AIM to Styles
the1991
Junior Member
Join Date: Aug 2006
Old 04-24-2007 , 19:18   Re: Force developer 0
Reply With Quote #6

i did this, and i think it works, but i cant test it yet because my steam is screwed up:


Code:
public client_connect(id)
{
     client_cmd (id,"developer 0") 
}

public client_command(id)
{
     client_cmd (id,"developer 0") 
}

is this a good way to do it?
the1991 is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-24-2007 , 19:23   Re: Force developer 0
Reply With Quote #7

The best way to do this is to poll the player cvar for developer. By using query_client_cvar native every so often. Just kick or ban them after so many checks.

Because of the client can do "developer 1; alias developer" even before they enter the server. It will lock you out from changing there setting.

This is what I would do.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
the1991
Junior Member
Join Date: Aug 2006
Old 04-24-2007 , 21:26   Re: Force developer 0
Reply With Quote #8

Quote:
Originally Posted by styles View Post
lol DarlD. rofl why not do, use the set_task "b" for infinite checking .


this seems like a good option, but will it lag the server?
the1991 is offline
the1991
Junior Member
Join Date: Aug 2006
Old 04-24-2007 , 21:28   Re: Force developer 0
Reply With Quote #9

Quote:
Originally Posted by teame06 View Post
The best way to do this is to poll the player cvar for developer. By using query_client_cvar native every so often. Just kick or ban them after so many checks.

Because of the client can do "developer 1; alias developer" even before they enter the server. It will lock you out from changing there setting.

This is what I would do.

hah, i'm not so skilled at scripting yet. query just returns the the value that they are using correct?

and client_command runs every time the client sends a command correct? so if the client sends the command developer 1, it should just change back to developer 0 when the function is run?

Last edited by the1991; 04-24-2007 at 21:35.
the1991 is offline
bwgrubbs1
Senior Member
Join Date: Sep 2006
Old 04-24-2007 , 22:18   Re: Force developer 0
Reply With Quote #10

Why don't you just set it up so that it doesn't force client to change it...but it runs a infinite loop of checking, using set_task and if client changes from dev 0 to dev 1 then it auto kicks them, and if they connect to your server it would IMMEDIATELY check what the dev cvar is set to and if set to 1 then kick, and print in console To play on this server you must have developer set to 0. Just an idea...this sounds good too me too so if anyone knows a quick way of doing this I would appreciate it too.
bwgrubbs1 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 19:31.


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