Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- //Variavel & Forwards
- new PLDano[MAX_PLAYERS];
- forward SetVarHealth(playerid);
- forward ResetFKill(playerid);
- //====================
- public OnFilterScriptInit()
- {
- print("\n---------------------------------------------");
- print(" Anti Fake-Kill by Mandrack_FreeZe - ATIVADO");
- print("-----------------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n---------------------------------------------");
- print(" Anti Fake-Kill by Mandrack_FreeZe - DESATIVADO");
- print("-----------------------------------------------\n");
- return 1;
- }
- #else
- #endif
- public OnPlayerConnect(playerid)
- {
- PLDano[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- PLDano[playerid] = 0;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- PLDano[playerid] = 0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(playerid != killerid && reason != 255)
- {
- if(PLDano[playerid] == 0)
- {
- new string[50], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,sizeof(pName));
- format(string, sizeof(string),"%s[ID:%d] foi banido. (Fake-Kill)", pName, playerid);
- SendClientMessageToAll(-1, string);
- Ban(playerid);
- SetTimerEx("ResetFKill", 5000, false, "d", killerid);
- } else
- {
- PLDano[playerid] = 0;
- return 1;
- }
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
- {
- new Float:pVida;
- GetPlayerHealth(playerid, pVida);
- PLDano[playerid] = 1;
- if(pVida > 0)
- {
- SetTimerEx("SetVarHealth", 300,false, "d", playerid);
- }
- return 1;
- }
- public SetVarHealth(playerid)
- {
- PLDano[playerid] = 0;
- return 1;
- }
- public ResetFKill(playerid)
- {
- SetPlayerWantedLevel(playerid, 0);
- SendClientMessage(playerid,-1, "Seu nível de procurado foi resetado pela suspeita de Fake-Kill.");
- return 1;
- }
- //Sistema criado por Mandrack_FreeZe
- //Não retire os créditos!
Add Comment
Please, Sign In to add comment