ps: i didnt understand any thing from yours answer and why no return in AMXX?
There is a reason that get_user_name() requires the string to be passed as an argument with a length argument. You should do that exact same thing with your custom name function.