Posts: 85
Threads: 17
Joined: Jul 2015
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
Posts: 85
Threads: 17
Joined: Jul 2015
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(string, sizeof(string), "%s has been kicked by AdmBot for Fake Kill.", GetName(playerid));
SendClientMessageToAll(0xFF0000FF, string);
SendClientMessage(playerid, 0xFF0000FF, "You have been kicked for Fake Kill");
Kick(playerid);
}
return 1;
}
stock GetName(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
|
Thanks for the idea