Oks, tnkz, and i have got other cuestion if you can help plz.
(I need kick a player, but if the player write in console "amx_123 Hello", the plugin donīt kick the player)
When a player enter in the server the plugin ...
Code:
register_clcmd("amx_123", "cmdChat")
///////////////////////////////////
public client_putinserver(id)
{
set_task(20.0, "client_1", id, "b")
}
If the player write in console "Hello", after 20 seconds the plugin create a file whit a random number
Code:
public cmdChat(id,level,cid)
{
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new message[192]
read_args(message,191)
remove_quotes(message);
new message2[256]
copy(message2 , 255 , "Hello");
if(equali(message,message2))
{
new text[256], file[64]
new numero = random_num(0, 100)
formatex( file, 63, "addons/amxmodx/123/%d.txt", numero)
formatex( text, 255, "my text should go here. For future reference, the numero is: %d", numero)
write_file( file , text )
}
return PLUGIN_HANDLED
}
This work i think, but this not, show this...
20 seconds later, when player entered in game the plugin show if the file exist....(because if the file exist, is because the player put amx_123 Hello)
Code:
public client_verificacion3(id)
{
if( !is_user_connected(id) ) { return PLUGIN_HANDLED; }
new name[32];
get_user_name( id , name , 31 );
if(file_exists( file ))
{
}
else
{
client_cmd(id,"disconnect")
}
return PLUGIN_CONTINUE
}
I make this, but i think there are other method to kick a player if this donīt say in console amx_123 Hello
no?
Tnkz and sorry if this a stupid question