Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #pragma semicolon 1
- #define WEAPON_LENGTH 32
- new bool:EnableStealthAssassin = true;
- public Plugin:myinfo =
- {
- name = "Stealth Assassin",
- author = "Rorschach",
- description = "Blocks vicims of backstabs from being reported.",
- version = "1.0",
- }
- public OnPluginStart()
- {
- RegAdminCmd("spy_sa", Command_PlayerDeath, ADMFLAG_SLAY, "Stealth Assassin Initiated");
- HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre);
- PrintToChatAll("Stealth Assassin Loaded: EnableStealthAssassin? %b", EnableStealthAssassin);
- }
- public Action:Command_PlayerDeath(client, args)
- {
- EnableStealthAssassin = !EnableStealthAssassin;
- PrintToChatAll("Stealth Assassin Command: EnableStealthAssassin? %b", EnableStealthAssassin);
- return Plugin_Handled;
- }
- public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
- {
- if (!EnableStealthAssassin)
- return Plugin_Continue;
- decl String:weapon[WEAPON_LENGTH];
- GetEventString(event, "weapon", weapon, sizeof(weapon));
- PrintToChatAll("Stealth Assassin: EnableStealthAssassin? %b Weapon? %s", EnableStealthAssassin, weapon);
- if (StrEqual(weapon, "knife"))
- return Plugin_Stop;
- return Plugin_Continue;
- }
Add Comment
Please, Sign In to add comment