Ulysses
General => Developers Corner => Topic started by: Conor on August 27, 2010, 11:28:08 AM
-
Hello ;D
I've been coding lua for about 2 months now,
I am trying to figure out how to find a players entire name by just typing have of it and searching for results.
Let's say I wanted to change a persons color to red when an admin types
!Red <PARTIAL SEGMENT OF PLAYERS NAME>"
.
How would I do this?
edit:
hook.Add( "PlayerSay", "HookNameBlarg", FunctionBlarg )
-
if you are using ULib, then it is really easy.
If you are trying to return a player object so that you can use it in your code you can do the following.
ULib.getUser(partialname)
this will return the user with that partial name or an error if there are more than 1 results.
-
http://ulyssesmod.net/docs/files/lua/ulib/shared/player-lua.html#getUser