DazzaJay Posted February 4, 2008 Share Posted February 4, 2008 I just had the best idea..... A Script, that can run on a server.... So that if somone joins with the name "Player" it will change thier name to thier MTAbeta login name. Because at the moment, we just have a script that kicks "Player" but some people wont know why because they dont know english. But yeah... in thoery... has joined the game 's name was changed to by server. and so on. But yeah, it would be only to run if the Players name wsa "Player" so people with proper names dont get thier names changed to thier login names. Link to comment
mabako Posted February 5, 2008 Share Posted February 5, 2008 so you're basically requesting access to the mtabeta/community.multitheftauto.com-database to get a nick by serial? I doubt they'll do, it's right now just available to check if a certain serial is valid and not what nick is assigned to a serial. Besides... just let them change their nick or set a 60 second-timer to kick them if they haven't changed until then... Link to comment
DazzaJay Posted February 5, 2008 Author Share Posted February 5, 2008 well, here is the thing, i dont belive it needs access to the mta beta, becaus i can just go to my servers admin panel and see thier mta beta login names in it, at the click of a button. so i figure if it can, then a script can, that runs client side, if client joins with "Player" the client side script changes thier name to "Jim117" or whatever his login name is. the way we have it at the moment is simple, we have a 5-second kick timer on "player" with kick reason of "Change your name before returning" but a lot of people are either arrogant, ignorant, or just plain dont know english, and try over and over and over again, till they give up.... like, heres an example.... (relayed from BOTH Pothole Studios Servers to IRC:) [06:36 AM] [PS]DM-SVR1: * Player joined the server.[06:36 AM] [PS]DM-SVR1: * Player left the server. (Kicked) [06:36 AM] [PS]DM-SVR1: * Player joined the server. [06:36 AM] [PS]DM-SVR1: * Player left the server. (Kicked) [06:36 AM] [PS]DM-SVR1: * Player joined the server. [06:36 AM] [PS]DM-SVR1: * Player left the server. (Kicked) [06:37 AM] [PS]DM-SVR2: * Player joined the server. [06:37 AM] [PS]DM-SVR2: * Player left the server. (Kicked) [06:37 AM] [PS]DM-SVR2: * Player joined the server. [06:37 AM] [PS]DM-SVR2: * Player left the server. (Kicked) [06:37 AM] [PS]DM-SVR2: * Player joined the server. [06:37 AM] [PS]DM-SVR2: * Player left the server. (Kicked) [06:37 AM] [PS]DM-SVR2: * Player joined the server. [06:37 AM] [PS]DM-SVR2: * Player left the server. (Kicked) its like.... HOW STUPID CAN YOU BE. even a person who dosent know english should know by atleast the third kick that the server dosent allow them. Link to comment
AlienX Posted February 5, 2008 Share Posted February 5, 2008 just look how the admin panel does it and snatch the code or summit. Link to comment
norby89 Posted February 5, 2008 Share Posted February 5, 2008 can you even change a player's nickname? I looked through the functions but couldn't find anything that does that Link to comment
szlend Posted February 5, 2008 Share Posted February 5, 2008 getPlayerUserName should do the trick. About the nick, I think you can only change the nametag http://development.mtasa.com/index.php? ... ametagText Link to comment
norby89 Posted February 5, 2008 Share Posted February 5, 2008 getPlayerUserName should do the trick. About the nick, I think you can only change the nametag http://development.mtasa.com/index.php? ... ametagText that only changes the nametag you see in the gameworld, not his actual nickname Link to comment
Twig Posted February 5, 2008 Share Posted February 5, 2008 I have a resource which changes players names to remove the characters ' and " from names as they mess up SQLite. Also It changes 'Player' to N00B plus some random integer. Don't kick people just because they're new, but mock them by all means. for example: local oldName = getClientName( source ) math.randomseed( getTickCount () ) math.random(100); math.random(100); moo = math.random(100) newName = string.gsub( newName , "Player", "N00B"..tostring(moo)) setClientName( source, newName ) Oh and trust me, people will come back over and over and over again. Take it as a complement Link to comment
norby89 Posted February 5, 2008 Share Posted February 5, 2008 ah there's a serverside setClientName, must have missed that Link to comment
DazzaJay Posted February 5, 2008 Author Share Posted February 5, 2008 Yo twig, does your script there put a random number on the end of "Players" name.... because i have seen somone with the name NOOB88 join my server often.... want to know if its your doing. Link to comment
norby89 Posted February 5, 2008 Share Posted February 5, 2008 function checkName() if getClientName ( source ) == "Player" then setClientName ( source, getPlayerUserName ( source ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), checkName ) this should do it (not tested) Link to comment
Woovie Posted February 5, 2008 Share Posted February 5, 2008 Yeah.. I have seen a few NOOB and some number floating around.. I hope you didn't cause this . Actually we should ALL install it and cause tons of noobs running around. Link to comment
DazzaJay Posted February 5, 2008 Author Share Posted February 5, 2008 I agree! Lets start a..... NOOBATHON! well.. this is from my servers IRC yesterday.... we havnt got the name changer or anything, but i can see the effects of people who have it.... 11:18 AM] [PS]DM-SVR2: * N00B35 joined the server.[11:18 AM] [PS]DM-SVR2: * N00B35 left the server. (Quit) [11:19 AM] [PS]DM-SVR2: * N00B35 joined the server. [11:20 AM] [PS]DM-SVR2: * N00B35 left the server. (Quit) [11:20 AM] [PS]DM-SVR2: * N00B35 joined the server. [11:20 AM] [PS]DM-SVR2: N00B35: hi [11:20 AM] [PS]DM-SVR2: N00B35: hi [11:21 AM] [PS]DM-SVR2: * N00B35 left the server. (Quit) Link to comment
Twig Posted February 5, 2008 Share Posted February 5, 2008 lol yes that's my fault, but they deserve it. tbh I just wanted something that meant my SQL db wouldn't be full of people called 'Player', also I presumed it'd make people want to set themselves proper names. Originally it was just to clean out those nasty characters but what the hey Link to comment
DazzaJay Posted February 5, 2008 Author Share Posted February 5, 2008 function checkName() if getClientName ( source ) == "Player" then setClientName ( source, getPlayerUserName ( source ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), checkName ) this should do it (not tested) Tested, works Brilliantly. Link to comment
DSC-L|Gr00vE[Ger] Posted February 5, 2008 Share Posted February 5, 2008 yeah norby89, this script works realy fine! me and my members tested it and every time it was right...^^ big thx and with the code of it, i can do some other nice scripts for my servers Link to comment
DazzaJay Posted February 6, 2008 Author Share Posted February 6, 2008 I must use my newly obtained knolage for EVIL!!!!! hehehe. Link to comment
CJGrove Posted February 6, 2008 Share Posted February 6, 2008 Think this should work? function checkName() if getClientName ( source ) =~ getPlayerUserName ( source ) then setClientName ( source, getPlayerUserName ( source ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), checkName ) This will stop them for using an other name (fake) then their username. Link to comment
szlend Posted February 6, 2008 Share Posted February 6, 2008 @CJGrove: They can still change it after joining the server Link to comment
CJGrove Posted February 6, 2008 Share Posted February 6, 2008 Yea but you can put it on a timer. Link to comment
norby89 Posted February 6, 2008 Share Posted February 6, 2008 Think this should work? function checkName() if getClientName ( source ) =~ getPlayerUserName ( source ) then setClientName ( source, getPlayerUserName ( source ) ) end end addEventHandler ( "onPlayerJoin", getRootElement(), checkName ) This will stop them for using an other name (fake) then their username. I don't like the idea of that, what if I want to play with my clan's tag and my account name is 'norby89'? Link to comment
DazzaJay Posted February 6, 2008 Author Share Posted February 6, 2008 agreed, i have a few variations of my name, [PS]DazzaJay[AU], DazzaJay, [PHS]Dan[AU], Daniel-Jay. like, in my own server, i often change to a name like "Dax" or "Ichigo" or somthing, so im not wearing my clan tag, or showing my name (helps to inspect cheaters better if they think there isnt an admin in there) Link to comment
SpInKsTaR Posted February 8, 2008 Share Posted February 8, 2008 What about a script that kicks or changes a persons name if it has too many Characters, Cause most cheaters extend their name Example Cake4173124176....So it makes it harder to type their name (For some people) Link to comment
DazzaJay Posted February 8, 2008 Author Share Posted February 8, 2008 you mean because you can enter a 25 character name if you use the /nick command, but only a 16 character name if you use the options menu? so limiting the names to 16 max? Link to comment
SpInKsTaR Posted February 8, 2008 Share Posted February 8, 2008 Basically...a sensible amount of characters most people have under 16 characters i guess Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now