MTA:DM Player Renamer

scm, pwn, mirc scripts, game mode management
Bookmark and Share

MTA:DM Player Renamer

Postby [DRuG]Dabombber on Sun Feb 17, 2008 9:44 pm

Something nice and simple, this automatically renames people called "Player" to their account name.
Attachments
playerrenamer.zip
(1.39 KiB) Downloaded 1468 times
User avatar

[DRuG]Dabombber
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 84
Joined: Sat Jul 28, 2007 7:35 pm


Re: MTA:DM Player Renamer

Postby [DRuG]KillFrenzy on Sun Feb 17, 2008 10:10 pm

Nice work Dabombber :D
But just one little problem with analyzing that. :)

If the account name cannot be found, 'getPlayerUserName' will return false which will cause an error in the script because 'false' is not a string. That means the server will return an error and the player would simply not be renamed. I don't know what else to rename them to if their account isn't found though.
User avatar

[DRuG]KillFrenzy
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 257
Joined: Sat Jul 28, 2007 7:07 pm
Location: My House


Re: MTA:DM Player Renamer

Postby [DRuG]NikT on Mon Feb 18, 2008 2:00 am

nice idea.


"But my head's all messed up, so you better driive brother"
User avatar

[DRuG]NikT
[DRuG] cofounder & your host

Status:
Check out the downloads and members areas on drugcrew.com

[DRuG] cofounder & your host
[DRuG] coleader
[DRuG] member
DRuG server admin
[AGS] member
]DR[ member
 
Posts: 2532
Joined: Sat Jul 28, 2007 10:39 am
Location: Melbourne, Victoria, Australia


Re: MTA:DM Player Renamer

Postby [DRuG]Grish on Mon Feb 18, 2008 10:56 am

How about if the account name is not found then generate a name based on minutes and seconds or something.

User avatar

[DRuG]Grish
[DRuG] coleader

Status:
i eated a butter

[DRuG] coleader
[DRuG] member
[alr] member
 
Posts: 349
Joined: Sat Jul 28, 2007 6:25 pm


Re: MTA:DM Player Renamer

Postby [DRuG]Dabombber on Mon Feb 18, 2008 11:33 am

I took the lazy way and did nothing if no name is found, although I've never seen any player without an account name. This also means it might be possible to have names like "Player(2)" so it renames them too. And in the unlikely event that the name is already taken, it does nothing (I'm so lazy :oops:).
User avatar

[DRuG]Dabombber
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 84
Joined: Sat Jul 28, 2007 7:35 pm


Re: MTA:DM Player Renamer

Postby Capsinurass on Mon Feb 18, 2008 4:05 pm

lol what some one did is to change the name of player to Noob with a random number at the end! :evilgrin:
User avatar

Capsinurass
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 148
Joined: Tue Jan 15, 2008 10:40 pm


Re: MTA:DM Player Renamer

Postby [DRuG]KillFrenzy on Mon Feb 18, 2008 4:32 pm

Can I do that part for you Dabombber? ;)
User avatar

[DRuG]KillFrenzy
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 257
Joined: Sat Jul 28, 2007 7:07 pm
Location: My House


Re: MTA:DM Player Renamer

Postby [DRuG]Dabombber on Mon Feb 18, 2008 5:50 pm

Feel free to make any improvements you can :)

Edit: fixed small typo
User avatar

[DRuG]Dabombber
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 84
Joined: Sat Jul 28, 2007 7:35 pm


Re: MTA:DM Player Renamer

Postby [DRuG]KillFrenzy on Mon Feb 18, 2008 9:05 pm

Well, here it is. Haven't tested, but I'm sure it should work, cause I've manually went through it several times. It will rename the player to "Player(1)", then "Player(2)", and so forth if it cannot rename the player to the account name for the rare occasion. (For example, an LAN game but the server isn't connected to the internet.)
Attachments
playerrenamer.zip
(876 Bytes) Downloaded 1537 times
User avatar

[DRuG]KillFrenzy
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 257
Joined: Sat Jul 28, 2007 7:07 pm
Location: My House


Re: MTA:DM Player Renamer

Postby [DRuG]Dabombber on Mon Feb 18, 2008 10:33 pm

LOL thats what mta does automatically I think...
User avatar

[DRuG]Dabombber
[DRuG] member
[DRuG] member
[alr] member
 
Posts: 84
Joined: Sat Jul 28, 2007 7:35 pm


Next

Return to Mission Mods

Who is online

Users browsing this forum: No registered users and 1 guest

cron