23.05.2016, 17:13
Hello.
When i unban someone, i want it to be posted in the table adminlogs.
This is the public:
this are the lines im talking about.
It doesn't seem to work.
What have i done wrong?
When i unban someone, i want it to be posted in the table adminlogs.
This is the public:
PHP код:
forward UnSuspend(playerid, name[]);
public UnSuspend(playerid, name[])
{
new num_rows,num_fields;
cache_get_data(num_rows,num_fields,dbhandle);
new query[400],query2[400],string3[200], string[MAX_STRING],temp_ip[32],temp_gpci[100],string6[32],string5[60],query3[128];
cache_get_field_content(0, "regip", temp_ip);
format(string6,sizeof(string6),"%s",temp_ip);
cache_get_field_content(0, "reggpci", temp_gpci);
format(string5,sizeof(string5),"%s",temp_gpci);
format(query,sizeof(query),"DELETE FROM ipbanned WHERE username = '%s'",name);
mysql_function_query(dbhandle,query,false,"","");
format(query2,sizeof(query2),"DELETE FROM suspended WHERE username = '%s'",name);
mysql_function_query(dbhandle,query2,false,"","");
format(iStr,sizeof(iStr),"[UNSUSPEND] You have succesfully unsuspended %s", name);
SendClientMessage(playerid, COLOR_GREEN, iStr);
format(string3,sizeof(string3),"[UNSUSPEND] By %s",AnonAdmin(playerid));
format(string,sizeof(string), "4{ UNSUSPEND } %s has unsuspended %s",AnonAdmin(playerid), name);
format(query3,sizeof(query3),"INSERT INTO adminlogs (username,bywho,wat,whendidithappen,ip,gpci) VALUES ('%s','%s','%s','%s','%s','%s')",name,AnonAdmin(playerid),string3,TimeDate(),string6,string5);
mysql_function_query(dbhandle,query3,false,"","");
iEcho(string);
return true;
}
PHP код:
format(string3,sizeof(string3),"[UNSUSPEND] By %s",AnonAdmin(playerid));name);
format(query3,sizeof(query3),"INSERT INTO adminlogs (username,bywho,wat,whendidithappen,ip,gpci) VALUES ('%s','%s','%s','%s','%s','%s')",name,AnonAdmin(playerid),string3,TimeDate(),string6,string5);
What have i done wrong?