Raised This Month: $12 Target: $400
 3% 

CL_EntityNum


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-31-2018 , 20:50   CL_EntityNum
Reply With Quote #1

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
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-01-2018 , 04:07   Re: CL_EntityNum
Reply With Quote #2

What entities are you spawning?
__________________
HamletEagle is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-01-2018 , 17:13   Re: CL_EntityNum
Reply With Quote #3

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.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-01-2018 , 17:32   Re: CL_EntityNum
Reply With Quote #4

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

Last edited by edon1337; 08-01-2018 at 17:32.
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-01-2018 , 17:36   Re: CL_EntityNum
Reply With Quote #5

Classname is pubg_weapons. I actually don't know why he asked it (as you said), but ok.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 08-01-2018 at 17:39.
EFFx is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 08-01-2018 , 17:44   Re: CL_EntityNum
Reply With Quote #6

Quote:
Originally Posted by EFFx View Post
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.
__________________
edon1337 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-01-2018 , 17:57   Re: CL_EntityNum
Reply With Quote #7

PHP Code:
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Old 08-02-2018, 10:05
CrazY.
This message has been deleted by CrazY.. Reason: nvm
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-02-2018 , 17:37   Re: CL_EntityNum
Reply With Quote #8

How is this supposed to fix? The problem is with index not how many models are spawned at the same time.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:39.


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