[Help]Anti Hack
#3

Ok it worked for that part, now I tried doing it for the rest. Here's an example, didn't work.

Код:
public OnPlayerChangeWeapon(playerid, oldweapon, newweapon)
{
	if( PlayerInfo[playerid][pGun][1] != 2 && GetPlayerWeapon( playerid ) == 2)
		{
		    // Don't really care about golf club hacking do we?
			//ExecuteHackerAction( playerid, newweapon );
		}
		else if( PlayerInfo[playerid][pGun][1] != 3 && GetPlayerWeapon( playerid ) == 3)
		{
			ExecuteHackerAction( playerid, newweapon );
		}
		else if( PlayerInfo[playerid][pGun][1] != 4 && GetPlayerWeapon( playerid ) == 4)
		{
		    if(PlayerInfo[playerid][pConnectTime] < 2 || PlayerInfo[playerid][pMember] != 8)
		    {
			    new WeaponName[32];
			    new logstring[256];
				GetWeaponName(newweapon, WeaponName, sizeof(WeaponName));
				GetPlayerName(playerid,UserName,24);
				new String[128];
	            format( String, sizeof( String ), "AdmCmd: %s has been banned, reason: Weapon hacking (%s).", UserName, playerid, WeaponName);
				SendClientMessageToAll( COLOR_LIGHTRED, String );
				SetPVarInt(playerid, "_HACK_WARNINGS", 0 );
				//RemovePlayerWeapon(playerid, weaponid);
				new year, month,day;
				getdate(year, month, day);
				new playerip[32];
				GetPlayerIp(playerid, playerip, sizeof(playerip));
				format( String, sizeof( String ), "AdmCmd: %s (IP:%s) was banned, reason: Weapon hacking (%s) (%d-%d-%d)", UserName, playerip, WeaponName ,month,day,year);
				BanLog(logstring);
                new ip[32];
				GetPlayerIp(playerid,ip,sizeof(ip));
				Kick(playerid);
				BanEx(playerid, "Banned By: Autoban Reason: Weapon Hacking");
			}
			ExecuteHackerAction( playerid, newweapon );
		}
Код:
C:\Users\Chaccour\Desktop\EURP\gamemodes\c4.pwn(2804) : error 017: undefined symbol "UserName"
C:\Users\Chaccour\Desktop\EURP\gamemodes\c4.pwn(2806) : error 017: undefined symbol "UserName"
Reply


Messages In This Thread
[Help]Anti Hack - by alainchaccour - 17.09.2011, 16:56
Re: [Help]Anti Hack - by Xyrex - 17.09.2011, 17:00
Re: [Help]Anti Hack - by alainchaccour - 17.09.2011, 17:10
Re: [Help]Anti Hack - by Xyrex - 17.09.2011, 17:12
Re: [Help]Anti Hack - by alainchaccour - 17.09.2011, 17:21

Forum Jump:


Users browsing this thread: 2 Guest(s)