I need help about blocking Self Kill Hack !
#1

Hello Sa-mp!

I'm here to ask for your help and wanted to know how I block this "SELF KILLING HACK" with a script under OnPlayerDeath public.

Video example: https://www.youtube.com/watch?v=AXZWoWON2VI
Reply
#2

PHP код:
new SuicideAttempts[MAX_PLAYERS];
public 
OnPlayerDeath(playeridkillerid)
{
    if(
killerid != INVALID_PLAYER_ID)
    {
        
PlayerInfo[killerid][Kills] ++; 
        
PlayerInfo[playerid][Deaths] ++; 
    }
    if(
killerid == playerid)
    {
        
SuicideAttempts[playerid] ++;
    }
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    if(
SuicideAttempts[playerid] >= 3)
    {
        new 
string[128];
        
format(stringsizeof(string), "%s has been kicked by AdmBot for Fake Kill."GetName(playerid));
        
SendClientMessageToAll(0xFF0000FFstring);
        
SendClientMessage(playerid0xFF0000FF"You have been kicked for Fake Kill");
        
Kick(playerid);
    }
    return 
1;
}
stock GetName(playerid)
{
    new 
pName[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpNamesizeof(pName));
    return 
pName;

Reply
#3

Quote:
Originally Posted by SkmDanny
Посмотреть сообщение
PHP код:
new SuicideAttempts[MAX_PLAYERS];
public 
OnPlayerDeath(playerid)
{
    if(
killerid != INVALID_PLAYER_ID)
    {
        
PlayerInfo[killerid][Kills] ++; 
        
PlayerInfo[playerid][Deaths] ++; 
    }
    if(
killerid == playerid)
    {
        
SuicideAttempts[playerid] ++;
    }
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    if(
SuicideAttempts[playerid] >= 3)
    {
        new 
string[128];
        
format(stringsizeof(string), "%s has been kicked by AdmBot for Fake Kill."GetName(playerid));
        
SendClientMessageToAll(0xFF0000FFstring);
        
SendClientMessage(playerid0xFF0000FF"You have been kicked for Fake Kill");
        
Kick(playerid);
    }
    return 
1;
}
stock GetName(playerid)
{
    new 
pName[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpNamesizeof(pName));
    return 
pName;

Thanks for the idea
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)