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

Constant Names v1.2


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Xanimos (85)
KoST
Senior Member
Join Date: Jul 2005
Old 05-09-2006 , 19:55   Constant Names v1.2
Reply With Quote #1

Constant Names v1.2
  • Description:
    This plugin allows admins to define (SteamID -> PlayerName) pairs in a config file. listed players can't change their name and are forced to have the defined one.

    Special Feature:
    players names are only changed serverside not clientside!
    an example: a player previously named 'Stan' is forced by this plugin to have the name '[UCT]Stan'. on the server the player has now the name '[UCT]Stan', but if he types 'name' in console to show his name he would get the following output: (although his playername is currently '[UCT]Stan')
    "name" is "Stan"
    which means that if he then connects to another server his name would be 'Stan' again.

  • Setup:
    edit new file: configs/constant_names.ini:
    here you can define which player(SteamID) should have which name.
    here is an example 'constant_names.ini' file:
    Code:
    STEAM_0:0:123459 "Sam"
    STEAM_0:0:123456 "KoST"
    STEAM_0:0:99662 "Elch"
    in this case for ex. the player with steam_id:[STEAM_0:0:123456] will be forced to have the playername 'KoST' and he is not able to change it.
  • Info
    if you need more than 100 predefined (SteamID -> PlayerName) pairs you must edit the sma file of this plugin and recompile:
    Code:
    // set this to a higher value if you need more predefined users in you config file #define MAX_USERS 100 // you can also modify the default config file name if needed #define CONFIG_FILE "constant_names.ini"

  • Required Modules:
    this plugin needs no additional modules
  • CVars
    none
  • Commands
    none

    ChangeLog:
  • 10. May 2006 - v1.0:
    --added: some code to empty file..
  • 10. May 2006 - v1.1:
    --changed: config file is now precached !
  • 10. May 2006 - v1.2:
    --added: some text output
Attached Files
File Type: sma Get Plugin or Get Source (const_names.sma - 3696 views - 2.8 KB)
__________________
KoST is offline
BACARRA
Senior Member
Join Date: Mar 2005
Old 05-09-2006 , 20:00  
Reply With Quote #2

can you make it so that when they enter the server it will automatically write their names in the config file
BACARRA is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-09-2006 , 20:12  
Reply With Quote #3

You should make it so that it loads the file once when the map loads. Then you should store the names/ids in global variables and check from there.

Here's a good example: http://forums.alliedmods.net/showthr...=237447#244642
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
KoST
Senior Member
Join Date: Jul 2005
Old 05-09-2006 , 20:12  
Reply With Quote #4

@BACARRA: adding this would cause all players to be doomed to have the name they had when they first connected to the server, you want that?

thx v3x
__________________
KoST is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-09-2006 , 20:14  
Reply With Quote #5

Would be a good idea...and add an option for an admin to change their name.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
BACARRA
Senior Member
Join Date: Mar 2005
Old 05-09-2006 , 20:14  
Reply With Quote #6

yes pls if that would be possible.
BACARRA is offline
KoST
Senior Member
Join Date: Jul 2005
Old 05-09-2006 , 20:19  
Reply With Quote #7

ok, now everybody is requesting to add stuff...
i think i will rewrite this using nvault to store names, this approach is better to get all your requests done !

[edit] i'm not going to add nvault

Last edited by KoST; 12-19-2006 at 23:35.
KoST is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 05-09-2006 , 20:22  
Reply With Quote #8

I like the simplicity of it. Steam ID... name... that makes it easy to just do what u want to do without worrying about anything else to set up. GJ nice work.
SubStream is offline
BACARRA
Senior Member
Join Date: Mar 2005
Old 05-09-2006 , 20:28  
Reply With Quote #9

it be more simple if it wrote it on its own. imagine having to type out over 2000 people steam ids and names and yes it is a good plugin
BACARRA is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 05-09-2006 , 20:40  
Reply With Quote #10

Quote:
Originally Posted by BACARRA
it be more simple if it wrote it on its own. imagine having to type out over 2000 people steam ids and names and yes it is a good plugin
Thats what Suicid3s amx_onename plugin is for....
SubStream 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 06:52.


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