Advertisement
Guest User

Untitled

a guest
May 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.86 KB | None | 0 0
  1. // [TF2] Remove garbage entities (ammo packs (from players), dropped weapons)
  2. // by CrazyHackGUT aka Kruzya
  3. // v1.0
  4. // https://g-44.ru/
  5.  
  6. #include <sdkhooks>
  7. #include <sdktools>
  8.  
  9. public Plugin myinfo = {
  10.   description = "Удаляет все мусорные энтити (аммо паки (которые дропаются с игроков), дропнутые оружия)",
  11.   version     = "1.0",
  12.   author      = "CrazyHackGUT aka Kruzya",
  13.   name        = "[TF2] Remove garbage entities",
  14.   url         = "https://g-44.ru/"
  15. };
  16.  
  17. public void OnEntityCreated(int iEntity, const char[] szClassName) {
  18.   if (strcmp(szClassName, "tf_ammo_pack") == 0 || strcmp(szClassName, "tf_dropped_weapon") == 0)
  19.     SDKHook(iEntity, SDKHook_SpawnPost, OnGarbageEntityReady);
  20. }
  21.  
  22. public void OnGarbageEntityReady(int iAmmoPack) {
  23.   AcceptEntityInput(iAmmoPack, "Kill");
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement