17.11.2016, 19:05
Alright so for some reason this code wont log any RCON commands and also wont log in any rcon login attemps.
And as it goes for RconLogin attempt, it gets called but IP and password wont be display in the SQL. It just sends empty parameter to the SQL.
This is the row from the SQL
As you can see the parameters are empty (param_empty is the default I've set)
EDIT: I fixed the login atempt, for some reason it had permission problems that were not part of the script itself but the samp.exe. I've ran the server exe as an admin and it works now.
NOTE: Still not loggin in the rcon commands
pawn Код:
public OnRconCommand(cmd[]) {
new string[128];
format(string,sizeof(string),"%s", cmd);
writeServerLog("public OnRconCommand()", string);
return 1;
}
stock writeServerLog(callback[], params[]) {
new query[512]; //512 since some queries I do are quite long such as OnCommandExecute etc.
mysql_format(mysql,query,sizeof(query),"INSERT server_logs (`callback`,`params`,`time`) VALUES ('%e','%e',%i) ",callback, params, gettime());
mysql_tquery(mysql, query, "");
}
pawn Код:
public OnRconLoginAttempt(ip[], password[], success) {
new string[128];
if(!success) {
format(string,sizeof(string),"IP: %s || Pass: %s || Success: FAILED", ip, password);
} else {
format(string,sizeof(string),"IP: %s || Pass: %s || Success: SUCCESS",ip, password);
}
writeServerLog("public OnRconLoginAttempt()", string);
return 1;
}
This is the row from the SQL
Quote:
public OnRconLoginAttempt() PARAM_EMPTY 147941258 |
EDIT: I fixed the login atempt, for some reason it had permission problems that were not part of the script itself but the samp.exe. I've ran the server exe as an admin and it works now.
NOTE: Still not loggin in the rcon commands