AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   CL_EntityNum (https://forums.alliedmods.net/showthread.php?t=309604)

EFFx 07-31-2018 20:50

CL_EntityNum
 
I searched about that error and found a lot of -num_edicts 4096/2046 etc... I tried to do that, and the server's entities ID changed to 4500, but the server still crash after some rounds.

I spawn 200 entities per round and remove all of them with EngFunc_RemoveEntity at HLTV event. So, what should I do? What else can be the problem?

The error is: After X rounds, everyone is dropped from the server and they can't join anymore. Also, the entites can't be spawned, because the entity limit.

Code:

Host_Error: CL_EntityNum: 1438 is an invalid number, cl.max_edicts is 1625

HamletEagle 08-01-2018 04:07

Re: CL_EntityNum
 
What entities are you spawning?

EFFx 08-01-2018 17:13

Re: CL_EntityNum
 
PHP Code:

new const g_szWeapons[][dWeaponData] =
{
    {
"models/w_ak47.mdl"CSW_AK47},
    {
"models/w_m4a1.mdl"CSW_M4A1},
    {
"models/w_famas.mdl"CSW_FAMAS},
    {
"models/w_galil.mdl"CSW_GALIL},
    {
"models/w_scout.mdl"CSW_SCOUT},
    {
"models/w_mp5.mdl"CSW_MP5NAVY},
    {
"models/w_p90.mdl"CSW_P90},
    {
"models/w_ump45.mdl"CSW_UMP45},
    {
"models/w_m3.mdl"CSW_M3},
    {
"models/w_xm1014.mdl"CSW_XM1014},
    {
"models/w_mac10.mdl"CSW_MAC10},
    {
"models/w_aug.mdl"CSW_AUG},
    {
"models/w_sg552.mdl"CSW_SG552},
    {
"models/w_tmp.mdl"CSW_TMP},
    {
"models/w_glock18.mdl"CSW_GLOCK18},
    {
"models/w_usp.mdl"CSW_USP},
    {
"models/w_elite.mdl"CSW_ELITE},
    {
"models/w_deagle.mdl"CSW_DEAGLE},
    {
"models/w_fiveseven.mdl"CSW_FIVESEVEN},
    {
"models/w_p228.mdl"CSW_P228},
    {
"models/w_hegrenade.mdl"CSW_HEGRENADE},
    {
"models/w_flashbang.mdl"CSW_FLASHBANG}


And

PHP Code:

    {"models/w_kevlar.mdl"ITEM_KEVLAR_ID},
    {
"models/pubg/itens/w_medkit.mdl"ITEM_MEDKIT_ID},
    {
"models/pubg/itens/w_capacete.mdl"ITEM_HELMET_ID},
    {
"models/pubg/itens/w_bag.mdl"ITEM_BAG_ID},
    {
"models/pubg/itens/w_impulsegrenade.mdl"ITEM_IMPULSE_ID},
    {
"models/pubg/itens/w_scope2x.mdl"ITEM_SCOPE2X_ID},
    {
"models/pubg/itens/w_scope4x.mdl"ITEM_SCOPE4X_ID},
    {
"models/w_9mmarclip.mdl"ITEM_PENTEALONGADO_ID

I'd pick a random origin and I do use these physics to spawn the entity:

PHP Code:

spawnEntity(iEntFloat:fOrigin[3], szModel[], szClassName[], iUser1iUser2 0iUser3 0)
{
    
engfunc(EngFunc_SetOriginiEntfOrigin)
    
engfunc(EngFunc_SetModeliEntszModel)

    static 
Float:fMaxs[3] = {5.03.06.0}
    static 
Float:fMins[3] = {-1.0, -3.0, -6.0}
                    
    
set_pev(iEntpev_solidSOLID_BBOX)
    
set_pev(iEntpev_gravity1.0)
    
set_pev(iEntpev_movetypeMOVETYPE_TOSS)
    
set_pev(iEntpev_classnameszClassName)
                
    
engfunc(EngFunc_SetSizeiEntfMinsfMaxs)
    
engfunc(EngFunc_DropToFlooriEnt)

    if(
iUser1)
    {
        
set_pev(iEntpev_iuser1iUser1)
    }
    
    if(
iUser2)
    {
        
set_pev(iEntpev_iuser2iUser2)
    }
    
    if(
iUser3)
    {
        
set_pev(iEntpev_iuser3iUser3)
    }


And set_rendering.

edon1337 08-01-2018 17:32

Re: CL_EntityNum
 
You didn't quite answer his question, he asked about entity class names.

EFFx 08-01-2018 17:36

Re: CL_EntityNum
 
Classname is pubg_weapons. I actually don't know why he asked it (as you said), but ok.

edon1337 08-01-2018 17:44

Re: CL_EntityNum
 
Quote:

Originally Posted by EFFx (Post 2607555)
Classname is pubg_weapons. I actually don't know why he asked it (as you said), but ok.

The real class name, which you use to create the entity, not the re-name.
It's because different entities react differently, take for example weaponbox.

EFFx 08-01-2018 17:57

Re: CL_EntityNum
 
PHP Code:

engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"


EFFx 08-02-2018 17:37

Re: CL_EntityNum
 
How is this supposed to fix? The problem is with index not how many models are spawned at the same time.


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

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