Вы устали от глупого народа на вашем сервере, которые не понимают что убивать на респауне нельзя, этот filterscript вам поможет!
Игрока заморозит на 5 секунд, если он даже попытается нажать кнопку стрельбы на респауне. PWN FORMAT: ПЕРЕДЕЛАЙТЕ В AMX
/* _______________________ [ ] [ AntiKill Filterscript ] [ Version 1.2 ] [ [2008] (C) by MaVe ] [_______________________] °°° Don't take my scripts and call them your's! °°° ==> Go to line 37 to define your own exceptions for AntiKill. */ #include new bool:KillFreezed[MAX_PLAYERS]; new RestSeconds[MAX_PLAYERS]; #define NOKILLING_STR "~r~No Killing here!~n~~n~~b~You are freezed~n~~n~~g~%d ~w~secs left" #define GAMETEXT_STYLE 5 forward GameTextUpdate(playerid); public OnPlayerDisconnect(playerid, reason) { KillFreezed[playerid] = false; RestSeconds[playerid] = 0; return 1; } // Define your own exceptions, e.g. DM-check stock Exception(playerid) { if (GetPlayerState(playerid) == PLAYER_STATE_DRIVER) return 1; // Don't check for killings if the player is the driver of a vehicle, thanks to kaisersouse. return 0; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys & KEY_FIRE && !KillFreezed[playerid] && !Exception(playerid)) { KillFreezed[playerid] = true; TogglePlayerControllable(playerid, false); RestSeconds[playerid] = 5; new str[128]; format(str, sizeof(str), NOKILLING_STR, RestSeconds[playerid]); GameTextForPlayer(playerid, str, 1000, GAMETEXT_STYLE); SetTimerEx("GameTextUpdate", 1000, 0, "i", playerid); } return 1; } public GameTextUpdate(playerid) { if (RestSeconds[playerid] != 0) { RestSeconds[playerid]--; new str[128]; format(str, sizeof(str), NOKILLING_STR, RestSeconds[playerid]); GameTextForPlayer(playerid, str, 1000, GAMETEXT_STYLE); SetTimerEx("GameTextUpdate", 1000, 0, "i", playerid); } else { GameTextForPlayer(playerid, "~r~No Killing again!", 1000, GAMETEXT_STYLE); KillFreezed[playerid] = false; TogglePlayerControllable(playerid, true); } } public OnFilterScriptExit() { for (new i=0; i<MAX_PLAYERS; i++) { if (KillFreezed[i]) { TogglePlayerControllable(i, true); KillFreezed[i] = false; } } return 1; }
|