If i use variables for example
new password[32]="7"
this affect all players
How can i use a variable for determinate player ?
I need this because i do this plugin...
The plugin when a player connect, show if this put in console amx_jojo 7
If the player put amx_jojo in 7 the server do nothing, but if the player don´t put nothing in 35 seconds the server kick player
This is the plugin
Code:
#include <amxmodx>
#include <amxmisc>
new Plugin_Author[] = "Super kuak xD";
new Plugin_Version[] = "V 100.0";
new Plugin_Name[] = "Plugin"
new password1[32]="no"
new password2[32]="si"
#define MAX_CLR 10
public plugin_init() {
register_concmd("amx_jojo","cmdChat",ADMIN_CHAT,"<password> - sends password to server")
register_plugin(Plugin_Name,Plugin_Version,Plugin_Author);
}
public client_putinserver(id)
{
set_task(35.0, "client_verification", id, "b")
}
public client_verification(id)
{
if( !is_user_connected(id) ) { return PLUGIN_HANDLED; }
new name[32];
get_user_name( id , name , 31 );
if( equali(password1,password2) )
{
client_print(id,print_chat,"*** It´s all right ***")
}
else
{
client_print(0,print_chat,"*** %s kicked from the server ***",name)
client_cmd(id,"toggleconsole")
client_cmd(id,"echo ^"*** Bye... see you!... ***^";disconnect")
}
return PLUGIN_CONTINUE
}
public cmdChat(id,level,cid) {
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new message[192]
read_args(message,191)
if( equali(message,password2) )
{
copy(password1, 31, "si")
}
return PLUGIN_HANDLED
}
Tnkz!