Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #include <cstrike>
- #include <sdkhooks>
- char Killer[MAXPLAYERS + 1];
- bool usedcmd[MAXPLAYERS + 1];
- bool clientiskiller[MAXPLAYERS + 1];
- EngineVersion g_Game;
- public Plugin myinfo =
- {
- name = "FK Reporter",
- author = "Stylish",
- description = "",
- version = "1.0",
- url = ""
- };
- public void OnPluginStart()
- {
- g_Game = GetEngineVersion();
- if (g_Game != Engine_CSGO && g_Game != Engine_CSS)
- {
- SetFailState("This plugin is for CSGO/CSS only.");
- }
- RegAdminCmd("sm_fk", Command_reportfk, 0);
- HookEvent("player_death", player_death);
- }
- public Action Command_reportfk(int client, int args)
- {
- if (IsClientInGame(client))
- {
- for (int i = 1; i <= MaxClients; i++)
- {
- if (IsClientInGame(i) && CheckCommandAccess(i, "", ADMFLAG_GENERIC) && !clientiskiller[client])
- {
- PrintToChat(i, "\x01[\x04BVGames RP\x01]\x04%N \x10reported \x04%s \x10for freekilling him.", client, Killer[client]);
- usedcmd[client] = true;
- }
- }
- }
- return Plugin_Handled;
- }
- public Action player_death(Event event, char[] name, bool dontBroadcast)
- {
- char KillerName[MAX_NAME_LENGTH];
- int client, attacker;
- client = GetClientOfUserId(event.GetInt("userid"));
- attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
- if (client == attacker)
- {
- clientiskiller[client] = true;
- }
- GetClientName(attacker, KillerName, MAX_NAME_LENGTH);
- Format(Killer[client], MAX_NAME_LENGTH, KillerName);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement