AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Crowbar and pistol after respawn (https://forums.alliedmods.net/showthread.php?t=85854)

BFK_GoNER 02-17-2009 02:25

Crowbar and pistol after respawn
 
Hi everybody,

1) I'm trying to code an instant player respawn plugin but I'm running into weird problems already. After intensive web/forum-searching I decided to use the spawn() function, however I noticed strange things - the player always leaves behind a crowbar and a 9mm pistol after respawning:

Screenshot

Is there any explanation to this? How can I avoid spawning extra weapon entities?

2) The second part of my code slays all players and respawns them instantly. The problem is that my server often crashes with "ED_Alloc: no free edicts" error, especially when there is a lot of people playing. Any idea on how to fix this?

Thanks a lot!

Arkshine 02-17-2009 03:28

Re: Crowbar and pistol after respawn
 
1) If you play HLDM I'm remember you respawn immediately. oO

2) Too many entities created at once. Don't know what are the plugins installed but you can change the max allowed. Add -num_edicts 2047 in your command line of your server.

BFK_GoNER 02-17-2009 03:35

Re: Crowbar and pistol after respawn
 
1) Well, not really. Unless a player hits the mouse button he can be in "ghost" state for as long as he wants. By the way, any idea how to disable it?

2) Awesome, I'll try that

BFK_GoNER 02-17-2009 06:45

Re: Crowbar and pistol after respawn
 
2) Did not work. Setting the key in liblist.gam gave this:

Host_Error: Couldn't get DLL API from .\valve\addons\metamod\dlls\metamod.dll -num_edicts 2047! Screen

Adding the key to the console did not help at all, the game crashed after 20 minutes. Is there a way to get rid of the garbage entities, like the ones that are not used anymore?

Arkshine 02-17-2009 07:12

Re: Crowbar and pistol after respawn
 
How do you start your server ?

BFK_GoNER 02-17-2009 10:31

Re: Crowbar and pistol after respawn
 
-- inside the .bat file: --

start hlds -console +map crossfire +maxplayers 32 -num_edicts 2047

Arkshine 02-17-2009 11:01

Re: Crowbar and pistol after respawn
 
Try to up the value more.

BFK_GoNER 02-17-2009 12:17

Re: Crowbar and pistol after respawn
 
Whatever I do with the value the maximum number of entities stays the same: 1365 (when there are 32 player slots).

I get this value with global_get() command. Maybe I'm doing something wrong?

Arkshine 02-17-2009 12:39

Re: Crowbar and pistol after respawn
 
Yep, something wrong. The switch name is right.

Should not be : start hlds "-console +map crossfire +maxplayers 32 -num_edicts 2047" ?

Make sure to stop and restart your server.

BFK_GoNER 02-18-2009 05:48

Re: Crowbar and pistol after respawn
 
Yeah I did tried that too. Still no effect.
I was thinking since metamod throws the error maybe it's metamod-related or game mod-related. I wish I could test it on cstrike server but I can't.
Any other ideas? :cry:


All times are GMT -4. The time now is 17:03.

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