AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [L4D2] How to remove melee weapons at the start of the map and safe room (https://forums.alliedmods.net/showthread.php?t=347205)

caphao1101 04-11-2024 11:24

[L4D2] How to remove melee weapons at the start of the map and safe room
 
As the title says, can anyone help me remove the melee weapons at the beginning of the map and in the safe room? Specific example: Dead Center map (c1m1) in the game you will see Fireaxe & Crowbar there and I want to delete them. I hope everyone will help me
Thank everyone <3

Silvers 04-11-2024 18:22

Re: [L4D2] How to remove melee weapons at the start of the map and safe room
 
Quote:

Originally Posted by little_froy (Post 2820825)
try

You should add pos[2] += 5.0 or 10.0 before calling the natives because the updated natives L4D_IsPositionIn* in Left4DHooks require line of sight to the nearest NavArea which on certain maps are blocked by a table etc.

You also need to reset entity to -1 before doing the next while loop in plugin start.

Maybe RemoveEntity is safer to use in these instances.

caphao1101 04-12-2024 09:32

Re: [L4D2] How to remove melee weapons at the start of the map and safe room
 
Quote:

Originally Posted by little_froy (Post 2820825)
try

Thank you very much little_froy, it works fine on my server :D

caphao1101 04-12-2024 09:36

Re: [L4D2] How to remove melee weapons at the start of the map and safe room
 
Quote:

Originally Posted by Silvers (Post 2820827)
You should add pos[2] += 5.0 or 10.0 before calling the natives because the updated natives L4D_IsPositionIn* in Left4DHooks require line of sight to the nearest NavArea which on certain maps are blocked by a table etc.

You also need to reset entity to -1 before doing the next while loop in plugin start.

Maybe RemoveEntity is safer to use in these instances.

I don't know what you mentioned but it works fine in my server :D

little_froy 04-12-2024 14:29

Re: [L4D2] How to remove melee weapons at the start of the map and safe room
 
1 Attachment(s)
Quote:

Originally Posted by caphao1101 (Post 2820853)
Thank you very much little_froy, it works fine on my server :D

found bug, pickuped melee will disappear after map tratransition, this should fix.

-prevent possible error in late load.

caphao1101 04-13-2024 11:35

Re: [L4D2] How to remove melee weapons at the start of the map and safe room
 
Quote:

Originally Posted by little_froy (Post 2820863)
found bug, pickuped melee will disappear after map tratransition, this should fix.

Thx bro, i will try

caphao1101 04-19-2024 10:44

Re: [L4D2] How to remove melee weapons at the start of the map and safe room
 
Quote:

Originally Posted by little_froy (Post 2820863)
found bug, pickuped melee will disappear after map tratransition, this should fix.

-prevent possible error in late load.

I tried it and it crashes my plugin and autoexec can you fix it...even though it doesn't say in the log file


All times are GMT -4. The time now is 05:50.

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