View Single Post
Author Message
iamyounghill
Junior Member
Join Date: Dec 2019
Old 12-22-2019 , 23:40   [help]Why doesn't it work?
Reply With Quote #1

I made a sample amxx ,but it doesn't work well .When clients connected ,it makes clients change their name many times,cyclically!
But I just want them to change one time .

[.sma]
..
public client_infochanged( id )
{
if( is_user_admin(id) )
{
format( newname, charsmax( newname ), "%s %s", tag1, oldname );
set_user_info( id, "name", newname );
return PLUGIN_HANDLED;
}

else
{
format( newname, charsmax( newname ), "%s %s", tag2, oldname );
set_user_info( id, "name", newname ) ;
return PLUGIN_HANDLED;
}

return PLUGIN_HANDLED;

}
..

Is the code "return PLUGIN_HANDLED" has some thing worng?

Last edited by iamyounghill; 12-22-2019 at 23:42.
iamyounghill is offline