Now I have a file that contains all of the nickname and I want to make a loop of this type
This is correct?
PHP Code:
new g_array_created;
// Arrays
new Array:g_spam;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Create the Array
g_spam = ArrayCreate(32, 1)
g_array_created = true
register_dictionary("nickname.txt")
}
public client_connect(id)
{
new szName[ 8 ];
get_user_name( id, szName, 7 );
for(new i = 0; i < ArraySize(g_spam); i++)
{
ArrayGetString(g_spam, i, buffer, 31);
if( equali( szName, g_spam[i] ) )
{
emessage_begin( MSG_ONE, SVC_DISCONNECT, _, id );
ewrite_string( "Please change your name." );
emessage_end( );
}
}
}