[help]Why doesn't it work?
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? |
Re: [help]Why doesn't it work?
client_infochanged is a fakemeta forward so you use return return FMRES_ *
|
Re: [help]Why doesn't it work?
client_infochanged isn't called when the client connects. It's called when the player's info changes, which happens quite often.
|
Re: [help]Why doesn't it work?
Probably need to use client_putinserver() or client_authorized() (which ever one happens first). Note that the order is indeterminate so you'll have to implement it so that it happens in that later one.
|
All times are GMT -4. The time now is 21:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.