I donīt know what can you say whit wasted conections..
mmm i put the plugin and compile perfect...
Code:
#include <amxmodx>
#include <dbi>
new Sql:dbc
// Start of plugin
public plugin_init() {
register_plugin("IP player registered?","1.0","ACA")
register_cvar("amx_aca_host","host")
register_cvar("amx_aca_user","username")
register_cvar("amx_aca_pass","password")
register_cvar("amx_aca_db","dbname")
set_task(1.0,"start_sql")
}
//Create a connection
public start_sql(id)
{
new host[32], username[32], password[32], dbname[32], error[32]
get_cvar_string("amx_aca_host",host,32)
get_cvar_string("amx_aca_user",username,32)
get_cvar_string("amx_aca_pass",password,32)
get_cvar_string("amx_aca_db",dbname,32)
dbc = dbi_connect(host,username,password,dbname,error,32)
if (dbc == SQL_FAILED)
{
server_print("[ACA] Disconnected")
}
else
{
server_print("[ACA] Connected")
new Result:result
new player_ip[36]
get_user_ip(id, player_ip, 35)
dbi_query(dbc,"SELECT * FROM aca_anticheat WHERE player_ip = '%s'", player_ip)
if(result >= RESULT_OK)
{
client_print(id,print_chat,"The IP are registered in DATA BASE")
}
else {
client_print(id,print_chat,"The IP are not registered in DATA BASE")
}
}
}