My fucking weapon anticheat
#1

I create an anticheat that detects if a player have a bazooka or a minigun . Well why some players are banned when connect to the server if they don't have the weapon? WHY?!!!!!!!!!!!!!!

Thanks xD
Reply
#2

Paste your code, as I'm not able to telepathically communicate with you and your script.
Reply
#3

Quote:
Originally Posted by CalgonX
Paste your code, as I'm not able to telepathically communicate with you and your script.
Its only a settimer and a getplayerweapon. I put if(IsPlayerConnect(playerid) { if(weaponid == 38 ( for example ) ) { Ban(blablalbla)...

Thanks.
Reply
#4

Use OnPlayerUpdate.

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38)
    {
        Ban(playerid);
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by MadeMan
Use OnPlayerUpdate.

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 38)
    {
        Ban(playerid);
    }
    return 1;
}
That's the problem?
Reply
#6

I just recommend you using this

I don't know what's the problem of your script because you're not showing it.
Reply
#7

Don't work. They are banning without any weapon yet

Here is a part of the code:

pawn Код:
new string[256];
new giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
new arma = GetPlayerWeapon(playerid);
//new ammo = GetPlayerAmmo(playerid);
if(arma == 1 && pArmaId1[playerid] == 0)
{
                        new year, month,day;
                        getdate(year, month, day);
                        format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
                        BanLog(string);
                        format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        PlayerInfo[playerid][pLevel] = -999;
                        Ban(playerid);
}
else if(arma == 2 && pArmaId2[playerid] == 0)
{
                        new year, month,day;
                        getdate(year, month, day);
                        format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
                        BanLog(string);
                        format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        PlayerInfo[playerid][pLevel] = -999;
                        Ban(playerid);
}
else if(arma == 3 && pArmaId3[playerid] == 0)
{
                        new year, month,day;
                        getdate(year, month, day);
                        format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
                        BanLog(string);
                        format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        PlayerInfo[playerid][pLevel] = -999;
                        Ban(playerid);
}
else if(arma == 4 && pArmaId4[playerid] == 0)
{
                        new year, month,day;
                        getdate(year, month, day);
                        format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
                        BanLog(string);
                        format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        PlayerInfo[playerid][pLevel] = -999;
                        Ban(playerid);
}
else if(arma == 5 && pArmaId5[playerid] == 0)
{
                        new year, month,day;
                        getdate(year, month, day);
                        format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: Cheto de mierda (%d-%d-%d)", giveplayer,month,day,year);
                        BanLog(string);
                        format(string, sizeof(string), "AdmCmd: %s a sido baneado por el anticheat de CTCCoco, razуn: owned", giveplayer);
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        PlayerInfo[playerid][pLevel] = -999;
                        Ban(playerid);
}
............etc
PLEASE help me.
Reply
#8

i had same problem

put on top
Код:
new PlayerSpawned[MAX_PLAYERS];
this onplayerconnect & disconnect
Код:
public OnPlayerConnect(playerid)
{
  PlayerSpawned[playerid] = 0;
	return 1;
}

public OnPlayerSpawn(playerid)
{
  PlayerSpawned[playerid] = 1;
	return 1;
}
Then in your weapon hack code
Код:
if(PlayerSpawned[i] == 1)
Reply
#9

Quote:
Originally Posted by ReteLikker
i had same problem

put on top
Код:
new PlayerSpawned[MAX_PLAYERS];
this onplayerconnect & disconnect
Код:
public OnPlayerConnect(playerid)
{
  PlayerSpawned[playerid] = 0;
	return 1;
}

public OnPlayerSpawn(playerid)
{
  PlayerSpawned[playerid] = 1;
	return 1;
}
Then in your weapon hack code
Код:
if(PlayerSpawned[i] == 1)
Thanks but you are sure that this works? You use it and don't are banning innocent people?

Thanks.
Reply
#10

I am using this also for my anti cheat filterscript. i had this also, people joined and 5 secs later they were banned for a unknown weapon. since i used this it's gone
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)