SA-MP Forums Archive
Little Bug - Where??? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little Bug - Where??? (/showthread.php?tid=110791)



Little Bug - Where??? - SureShot - 28.11.2009



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


Re: Little Bug - Where??? - Streetplaya - 28.11.2009

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


Re: Little Bug - Where??? - SureShot - 28.11.2009

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);
			}



Re: Little Bug - Where??? - Streetplaya - 28.11.2009

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


Re: Little Bug - Where??? - SureShot - 28.11.2009

Код:
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;
}



Re: Little Bug - Where??? - Streetplaya - 28.11.2009

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


Re: Little Bug - Where??? - SureShot - 28.11.2009

Look at the Screen.






Re: Little Bug - Where??? - Streetplaya - 28.11.2009

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


Re: Little Bug - Where??? - MJ! - 28.11.2009

post the AntiCheatLog ...


Re: Little Bug - Where??? - SureShot - 28.11.2009

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);
}