someone knows a good anti false kill?
#1

If someone knows an anti-fake kill, please tell me please


this anti kill fake is not good




Код:
public OnPlayerSpawn(playerid)
{
    SetPVarInt(playerid,"KilledFlood",0);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    SetPVarInt(playerid,"KilledFlood", GetPVarInt(playerid,"KilledFlood") + 1);
	if(GetPVarInt(playerid,"KilledFlood") > 1) return BanEx(playerid, "(Fake-Kill Flood)");
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    SetPVarInt(playerid,"KilledFlood",0);
    return 1;
}
Reply
#2

pawn Код:
OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == INVALID_PLAYER_ID) // invlalid killer id
    {
       // code here
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by SeanDenZYR
Посмотреть сообщение
pawn Код:
OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == INVALID_PLAYER_ID) // invlalid killer id
    {
       // code here
    }
    return 1;
}
That's not how a fake kill works...

A fake-kill is someone who is reporting to the server that they've been killed by another player when that player isn't near them, armed, or even attacking (It can also have all those factors mentioned applying).

Don't post up random shit for the sake of it.
Reply
#4

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
That's not how a fake kill works...

A fake-kill is someone who is reporting to the server that they've been killed by another player when that player isn't near them, armed, or even attacking (It can also have all those factors mentioned applying).

Don't post up random shit for the sake of it.
i've seen this type of anti fake kill in many scripts (also with the comment indicating that it is an anti fake kill) so maybe it was a wrong code aswell sooo, sorry
Reply
#5

That if statement is to avoid array out of bounds errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)