Command returns an invalid error
#3

Quote:
Originally Posted by Hunud
Посмотреть сообщение
Try this.

Код:
public OnOfflineBanPlayer(playerid, name[],reason[]) {
	new ip[16],accid[16];
	new rows, fields;
	cache_get_data(rows, fields);
	if(rows > 0) {
		SendClientMessage(playerid, X11_TOMATO_2, "* User not found");
		return 1;
	}
	cache_get_row(0,0,ip);
	cache_get_row(0,1,accid);
	format(query, sizeof(query),"INSERT INTO `bans` SET `bannerid` = %d,`reason` = \"%s\",`accountid` = %d,`ip` = INET_ATON(\"%s\")",GetPVarInt(playerid, "AccountID"), reason, strval(accid),ip);
	mysql_function_query(g_mysql_handle, query, true, "EmptyCallback", "");
	format(query, sizeof(query), "[AdmWarn]: %s has OBanned %s: %s",GetPlayerNameEx(playerid, ENameType_AccountName), name, reason);
	ABroadcast(X11_TOMATO_2, query, EAdminFlags_All);
	return 1;
}
As expected, it does not seem to work.

It does say that the user has been offline banned yet the user is still not banned. Moreover, even if the account doesn't exist, it still shows the message that the account has been banned.
Reply


Messages In This Thread
Command returns an invalid error - by Parallex - 03.01.2018, 18:08
Re: Command returns an invalid error - by Hunud - 03.01.2018, 18:41
Re: Command returns an invalid error - by Parallex - 04.01.2018, 03:59

Forum Jump:


Users browsing this thread: 1 Guest(s)