Anti FakeKill
#1

I need a working anti fake kill fs/include or whatever,hackers are anoying my players.REP who helps me
Reply
#2

pawn Код:
new PlayerShotPlayer[MAX_PLAYERS][MAX_PLAYERS];

public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    PlayerShotPlayer[issuerid][playerid] = 1;
    return 0;
}

public OnPlayerDeath(playerid,killerid,reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        if(!PlayerShotPlayer[killerid][playerid])
        {
            Ban(playerid);
        }
    }
    foreach(Player,i)
    {
        PlayerShotPlayer[i][playerid] = 0;
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by CZ
Посмотреть сообщение
pawn Код:
new PlayerShotPlayer[MAX_PLAYERS][MAX_PLAYERS];

public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    PlayerShotPlayer[issuerid][playerid] = 1;
    return 0;
}

public OnPlayerDeath(playerid,killerid,reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        if(!PlayerShotPlayer[killerid][playerid])
        {
            Ban(playerid);
        }
    }
    foreach(Player,i)
    {
        PlayerShotPlayer[i][playerid] = 0;
    }
    return 1;
}
Where exactly should i add this piece of code?
Reply
#4

Quote:
Originally Posted by CZ
Посмотреть сообщение
pawn Код:
new PlayerShotPlayer[MAX_PLAYERS][MAX_PLAYERS];

public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    PlayerShotPlayer[issuerid][playerid] = 1;
    return 0;
}

public OnPlayerDeath(playerid,killerid,reason)
{
    if(killerid != INVALID_PLAYER_ID)
    {
        if(!PlayerShotPlayer[killerid][playerid])
        {
            Ban(playerid);
        }
    }
    foreach(Player,i)
    {
        PlayerShotPlayer[i][playerid] = 0;
    }
    return 1;
}
It gave me these errors
Код:
C:\Users\Korisnik\Desktop\Yugoslavia Trucking v.0.3.7\include\Geo.inc(435) : error 017: undefined symbol "foreach"
C:\Users\Korisnik\Desktop\Yugoslavia Trucking v.0.3.7\include\Geo.inc(437) : error 017: undefined symbol "playerid"
C:\Users\Korisnik\Desktop\Yugoslavia Trucking v.0.3.7\include\Geo.inc(440) : error 017: undefined symbol "playerid"
C:\Users\Korisnik\Desktop\Yugoslavia Trucking v.0.3.7\gamemodes\YT.pwn(3254) : error 021: symbol already defined: "OnPlayerDeath"
C:\Users\Korisnik\Desktop\Yugoslavia Trucking v.0.3.7\gamemodes\YT.pwn(3262) : error 017: undefined symbol "foreach"
C:\Users\Korisnik\Desktop\Yugoslavia Trucking v.0.3.7\gamemodes\YT.pwn(3264) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#5

Removed.
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=582630

Your example can give false results, especially if the player is using a weapon with a minigun or whatever.
Reply
#7

Ty man solved all the errors (Y)
Reply
#8

Quote:
Originally Posted by Abagail
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=582630

Your example can give false results, especially if the player is using a weapon with a minigun or whatever.
Код:
C:\Users\Korisnik\Desktop\Yugoslavia Trucking v.0.3.7\include\onplayerfakekill.inc(24) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#9

You are using outdated SA-MP includes and or you are using YSI 3.0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)