AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2]Clear drop items (https://forums.alliedmods.net/showthread.php?t=314160)

AK978 02-06-2019 05:26

[L4D2]Clear drop items
 
1 Attachment(s)
Description:
Delete discarded items


Reason for creation:
My server has too many entities. Write this plugin to reduce the possibility of server crashes.
The total number of custom map entities is too large. If you have a lot of plugins installed or modified the number of entities, you can try.


How long does it take to clear after discarding:
sm_drop_clear_time ""


Save Log:
logs/remove_drop_weapon.log


classname:
https://developer.valvesoftware.com/..._L4D2_Entities

line 7:
Modify the "weapon name" to support other games(The following is the L4D2 version)
Code:

new const String:ItemDeleteList[][] =
{
        "weapon_smg_mp5",
        "weapon_smg_silenced",
        "weapon_smg",
        "weapon_shotgun_chrome",
        "weapon_pumpshotgun",
        "weapon_hunting_rifle",
        "weapon_autoshotgun",
        "weapon_shotgun_spas",
        "weapon_sniper_military",
        "weapon_rifle_m60",
        "weapon_rifle_ak47",
        "weapon_rifle_desert",
        "weapon_rifle_sg552",
        "weapon_rifle",
        "weapon_sniper_awp",
        "weapon_sniper_scout",
        "weapon_grenade_launcher",
        "weapon_pistol_magnum",
        "weapon_pistol",
        "weapon_molotov",
        "weapon_pipe_bomb",
        "weapon_vomitjar",
        "weapon_defibrillator",
        "weapon_pain_pills",
        "weapon_adrenaline",       
        "weapon_melee"
};



version:
clear_weapon_drop.smx
v1.0 new plugin
v1.1 dug fix
v1.2 Change print language (Mi.Cura)
v1.3 bug fix (Marttt)
v1.4 change some code to support other games
v1.5 bug fix
v1.6 bug fix
v1.7 bug fix
v1.8 add hook player_disconnect(z), EntIndexToEntRef(HarryPotter)
StrContains change StrEqual



My plugins

贊助網址 Donation URL
https://pay.ecpay.com.tw/CreditPayme...=3050613&Enn=e

AK978 02-09-2019 21:01

Re: [l4d2]remove drop weapon
 
v1.1 修復刪除錯誤項目

phoenix0001 02-10-2019 09:55

Re: [l4d2]remove drop weapon
 
测试中

Mi.Cura 02-10-2019 10:28

Re: [l4d2]remove drop weapon
 
I tried to compile because PrintToChat is in the Chinese language. And I got these errors:


/home/groups/sourcemod/upload_tmp/phpA7jZ8C.sp(1): error 010: invalid function or declaration
/home/groups/sourcemod/upload_tmp/phpA7jZ8C.sp(59): warning 213: tag mismatch
/home/groups/sourcemod/upload_tmp/phpA7jZ8C.sp(85): warning 213: tag mismatch
/home/groups/sourcemod/upload_tmp/phpA7jZ8C.sp(94): warning 213: tag mismatch

The correct way would be to be in English, to be compiled for each language that was desired. My opinion

AK978 02-10-2019 11:04

Re: [l4d2]remove drop weapon
 
1 Attachment(s)
I use google translation....

warning is ok
can use

I am not a professional staff compiled, I am sorry for my limited ability.
Anyone is welcome to perfect it

Mi.Cura 02-10-2019 20:25

Re: [l4d2]remove drop weapon
 
Quote:

Originally Posted by AK978 (Post 2639025)
I use google translation....

warning is ok
can use

I am not a professional staff compiled, I am sorry for my limited ability.
Anyone is welcome to perfect it

no problem, just to report the error while compiling.
Thank you for sharing your work.

Mi.Cura 02-10-2019 20:27

Re: [l4d2]remove drop weapon
 
Quote:

Originally Posted by Marttt (Post 2639098)
Well i removed the warnings, but need to test

Changes:
Spoiler


Thanks for this Marttt !

PS: Mais uma vez obrigado por ajudar compartilhando seu conhecimento.

AK978 02-10-2019 23:25

Re: [l4d2]remove drop weapon
 
Thank you for your repair
I will update the version for it.

Mi.Cura 02-13-2019 08:14

Re: [l4d2]remove drop weapon
 
Just to report.
I tested it and everything okay, works well.

Thank you all

AK978 03-02-2019 04:18

Re: [Any]Remove Drop Weapon
 
v1.4:
Remove some code to support other games


All times are GMT -4. The time now is 04:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.