AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   "Members only" cs-servers (https://forums.alliedmods.net/showthread.php?t=25501)

active-x 03-15-2006 06:13

"Members only" cs-servers
 
Anyone know how i can code this script or maybe anyone have a script for me that works this way:

Well, starting, i want a script that kicks users thats not have registered their steam_id at a mysql database. If the steam_id thats connect is in the database, the user will rename to the same as the username on the database.

Ex: If a user with the steam_id 123 connects and is not in the database, she/he will be kicked. If another user with the steam_id 456 connects and is in the database, the server will rename the users name to the same name as inserted in the same row as the steamid. Ex Freddy19. So if the user with steam_id 456 connects with the name n00b, it will automatically rename to Freddy19. And the user is unable to change his or her name.

The mysql-table will have 2 fields in use in this script: steam_id and username.

Thanks in advance. Hoping for good answers ;)

BAILOPAN 03-15-2006 06:49

This is pretty simple to do. In client_authorized, get the user's steam id, see if it's in the database, and kick them otherwise.

You might want to look at JGHG's forum integration plugin to see what I mean.

active-x 03-15-2006 08:50

Quote:

Originally Posted by BAILOPAN
This is pretty simple to do. In client_authorized, get the user's steam id, see if it's in the database, and kick them otherwise.

You might want to look at JGHG's forum integration plugin to see what I mean.

i'm really new with this coding language, i usually code php and mysql. so if you please could give me some examples or links to guides?

And how about forcing the name as the one in the row?

active-x 03-15-2006 11:03

Have found a solution, but now i need a code that can prevent users from changing nicknames, anyone?


All times are GMT -4. The time now is 20:27.

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