Little Bug - Where???
#1



That shit is at ALL kicks/bans.

Код:
			new sendername[MAX_PLAYERS], ThePlayer[MAX_PLAYER_NAME], string[256];
  			getdate(year, montha, day);
			GetPlayerName(playerid, sendername, sizeof(sendername));
			GetPlayerName(pID, ThePlayer, sizeof(ThePlayer));
			format(string, sizeof(string), "%s wurde von %s gebannt, Grund: %s (%d.%d.%d)", ThePlayer, sendername, sGrund, day, montha, year);
			BanLog(string);
			format(string, sizeof(string), "%s wurde von %s gebannt, Grund: %s", ThePlayer, sendername, sGrund);
			SendClientMessageToAll(COLOR_LIGHTRED, string);
			Ban(pID);
If I only set the Message and the Ban(pID) its the same...

Where can be the bug?

I dont want to release my full script :S
Reply
#2

are you using dcmd or what? you'll have to show us some more, insert debug printf's, like print what pID is..
Reply
#3

yes dcmd. but on my anti cheat thats the same problem.

Look here.

Код:
			if(GetPlayerSpecialAction(i) == 2)
			{
				format(string,sizeof(string), "[SERVERGUARD] %s wurde gebannt, Grund: Jetpack", GetName(i));
				SendClientMessageToAll(COLOR_LIGHTRED, string);
				BanLog(string);
				Ban(i);
			}
Reply
#4

I can't see how "i" is defined there, I guess it's a loop but still - that's not enough code
Reply
#5

Код:
public AntiHack()
{
	new string[256];
	for(new i; i<MAX_PLAYERS; i++)
	{
	  if(IsPlayerConnected(i) && Spawned[i] == 1)
		{
			if(GetPlayerSpecialAction(i) == 2)
			{
				format(string,sizeof(string), "[SERVERGUARD] %s wurde gebannt, Grund: Jetpack", GetName(i));
				SendClientMessageToAll(COLOR_LIGHTRED, string);
				AntiCheatLog(string);
				Ban(i);
			}
		}
	}
	return 1;
}

stock GetName(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	return name;
}
Reply
#6

ok and now again, what's your actual problem..
Reply
#7

Look at the Screen.



Reply
#8

I don't know whether this is new since 0.3, but show us your AntiCheatLog/BanLog functions
Reply
#9

post the AntiCheatLog ...
Reply
#10

this bug exist too, when i'm delete the AntiCheatLog from the "ban"

Код:
public AntiCheatLog(string[])
{
	new entry[256];
	format(entry, sizeof(entry), "%s\n",string);
	new File:hFile;
	hFile = fopen("ServerLog/AntiCheat.log", io_append);
	fwrite(hFile, entry);
	fclose(hFile);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)