Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Full Name Needed for Commands
#1
Author: Dave
Difficulty: 1/5

"This tutorial is supported for only MSE build 1. If you can't handle doing this on your server, no matter what base, you need serious help.

This tutorial makes it so you need the entire name of a player to use a command on them.

It eliminates confusion between similar names, and using nicknames that would make it go to more than one person. Sometimes people would make it so they couldnt be kicked or the like, because they're hiding behind someone elses name.
"

:: SERVER SIDE ::
Go to the FindPlayers sub.

Currently, it checks that the name you passed is the same size or smaller than the name of the player.

Change that line to this:
Code:
If LenB(GetPlayerName(i)) = LenB(Trim$(Name)) Then

Because we now make the assumption that the two strings must be the same length, we can shrink the next line up a little bit, and just check if they're the same.

Code:
If UCase$(GetPlayerName(i)) = UCase$(Trim$(Name)) Then
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)