findplayer 

$findplayer(Search string, variable name)

The findplayer function will find a player in the server by name if possible. It will suggest two possible matches if there is more than one, and it is aware of the I and l similarity in halflife, and will intelligently report alternatives. Search string is the substring to search for, and variable name is the variable on the server target to place the results in. The function returns 1 if it successfully matched a player, and fills the variable with the userid of that player. It returns 0 on failure, and fills the variable with a string describing the problem.

Example:


$findplayer() example

if ($findplayer(Bob,plr))
 /echo * Found Bob with userid $(serv,@plr);
else
 /echo * Error: $(serv,@plr);