Raised This Month: $ Target: $400
 0% 

ED_Alloc: no free edicts


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-25-2009 , 07:44   ED_Alloc: no free edicts
Reply With Quote #1

PHP Code:
if(is_user_alive(id))
                {
                    
set_user_maxspeed(id,0.0)
                    
strip_user_weaponsid )
                    
set_user_godmode(id,1)
                    
fade_2_black(id1);
                    
message_begin(MSG_ALLget_user_msgid("ScoreAttrib"),{0,0,0},0
                    
write_byte(id
                    
write_byte(4
                    
message_end() 

                }

stock fade_2_black(idtype)
{
    
message_begin(MSG_ONE_UNRELIABLEgmsgScreenFade_id);
    
write_short(5000);
    
write_short(5000);
    
write_short(type==1?5:0);
    
write_byte(0);
    
write_byte(20);
    
write_byte(40);
    
write_byte(255);
    
message_end();
}

gmsgScreenFade    get_user_msgid("ScreenFade"); 
error = ED_Alloc: no free edicts

know anyone a better way to made black fade?
or just do 30 sec. black fade on player
__________________

Last edited by One; 10-25-2009 at 07:46.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 07:50   Re: ED_Alloc: no free edicts
Reply With Quote #2

I doubt the error is because of this code.

This error is more you use too much entities at once. There is a limit which can be calculated like this :max_entities = 900 + 15 * ( max_clients - 1 ).

You can define a custom value to up the limit using the switch "-num_edicts" in your line command line. eg : [...] -map blabla -num_edicts 2047

If you can't it's probably a plugin badly coded which don't remove properly entities which create or a plugin which create too much entities at once.


About the black fade, you maye be interested by this stock.
__________________
Arkshine is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-25-2009 , 07:55   Re: ED_Alloc: no free edicts
Reply With Quote #3

ty.
i tried this one here but i get errors :


PHP Code:
UTIL_FadeToBlack(id,30.0,false,true
idk why i cant compile my code with this
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 07:57   Re: ED_Alloc: no free edicts
Reply With Quote #4

What's the error ?
__________________
Arkshine is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-25-2009 , 07:59   Re: ED_Alloc: no free edicts
Reply With Quote #5

Warning: Expression has no effect on line 140



edit: i got it but the same error ( ED_Alloc: no free edicts )
__________________

Last edited by One; 10-25-2009 at 08:01.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 08:02   Re: ED_Alloc: no free edicts
Reply With Quote #6

Show more code, your error is not from this line.
__________________
Arkshine is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-25-2009 , 08:03   Re: ED_Alloc: no free edicts
Reply With Quote #7

here the full code

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <screenfade_util>

new g_spieler_anzahl_checked 0
new g_first_round 0
new g_MaxPlayers

public plugin_init() 
{
    
register_plugin("Versteck dich""1.0""Dr.One")
    
register_event("HLTV""Start_new_round""a""1=0""2=0")
    
g_MaxPlayers get_maxplayers()
    
register_logevent("round_end"2"1=Round_End")
    
register_event"ResetHUD""Event_ResetHUD""be" );
}
public 
Start_new_round()
{
    
/*Zuerst abfrage für spieler anzhal auf dem server*/
    
new g_Spieler_anzahl;
    
g_Spieler_anzahl get_playersnum(1);
    
    
/*nun abfragen ob wir das spiel stanten können*/
    
if( g_Spieler_anzahl && g_spieler_anzahl_checked == 0)
    {
        
Start_the_MOD()
        
client_print(0,print_chat,"Enough players on server!The game has begonn")
        
server_cmd("sv_restart 10")
        
g_spieler_anzahl_checked 1
        g_first_round 
1
    
}
    else if( 
g_Spieler_anzahl 3)
    {
        
client_print(0,print_chat,"Not enough players on server!Waiting for more players to begin the game")
        
g_spieler_anzahl_checked 0
    
}
    else if(
g_spieler_anzahl_checked == && g_Spieler_anzahl 3)
    {
        
g_spieler_anzahl_checked 0
        g_first_round 
0
    
}
}
public 
Start_the_MOD()
{
    
/*alles für erste runde kommt hier rein*/
    
client_print(0,print_chat,"ich wills")
    
/*fürs erste setzen wir alle in T*/
    
for(new id 1id <= g_MaxPlayersid++)
    {
        if(
is_user_connected(id))
        {
            
cs_set_user_team(id,CS_TEAM_T)
        }
    }
    
/*jetzt einer geht Random zu CT*/
    
new iPlayers32 ], iNumiPlayer;
    
get_playersiPlayersiNum );
    
    
iPlayer iPlayersrandomiNum ) ];
    if(
is_user_connected(iPlayer)||cs_get_user_team(iPlayer) == CS_TEAM_CT || cs_get_user_team(iPlayer) == CS_TEAM_T)
    {
        
cs_set_user_team(iPlayer,CS_TEAM_CT)
    }
}
public 
round_end()
{
    if(
g_spieler_anzahl_checked == 1)
    {
        new 
alive_Ts[33], Ts[33], alive_CTs[33], CTs[33]
        new 
alive_Ts_numTs_numalive_CTs_numCTs_numid
        
for(new 1<= g_MaxPlayersi++)
        {
            if(!
is_user_connected(i))
                continue
                
            switch(
cs_get_user_team(i))
            {
                case 
CS_TEAM_CT:
                {
                    
CTs[CTs_num++] = i
                    
if(is_user_alive(i))
                    
alive_CTs[alive_CTs_num++] = i
                
}
                case 
CS_TEAM_T:
                {
                    
Ts[Ts_num++] = i
                    
if(is_user_alive(i))
                    
alive_Ts[alive_Ts_num++] = i
                
}
            }
        }

        if(
CTs_num Ts_num 2)
            return  
// not enough players
    
        
if(alive_Ts_num 0)
        {
            
cs_set_user_team(alive_Ts[random(alive_Ts_num)], CS_TEAM_CT)
        }
        
        else if(
alive_CTs_num 0)
        {
            
id alive_CTs[random(alive_CTs_num)]
        }
            
        else if(
Ts_num 0)
        {
            
cs_set_user_team(Ts[random(Ts_num)], CS_TEAM_CT)
        }
            
        else if(
CTs_num 0)
        {
            
id CTs[random(CTs_num)]
        }

        for(new 
i=0i<CTs_numi++)
        {
            if(
CTs[i] != id)
            
cs_set_user_team(CTs[i], CS_TEAM_T)
        }
    }
}
public 
Event_ResetHUD()
{
    if(
g_spieler_anzahl_checked == 1)
    {
        for(new 
id 1id <= g_MaxPlayersid++)
        {
            if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
            {
                
                
//return PLUGIN_HANDLED 
                
if(is_user_alive(id))
                {
                    
set_user_maxspeed(id,0.0)
                    
strip_user_weaponsid )
                    
set_user_godmode(id,1)
                    
UTIL_FadeToBlack(id,30.0,false,true
                    
//message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"),{0,0,0},0) 
                    //write_byte(id) 
                    //write_byte(4) 
                    //message_end() 

                
}
                    
            }
        }
    }

__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 08:26   Re: ED_Alloc: no free edicts
Reply With Quote #8

Your plugin compiles fine.

Don't use ResetHud, use Ham_Spaw, btw.
__________________
Arkshine is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-25-2009 , 09:58   Re: ED_Alloc: no free edicts
Reply With Quote #9

Quote:
Originally Posted by Arkshine View Post
Your plugin compiles fine.

Don't use ResetHud, use Ham_Spaw, btw.
Attached Thumbnails
Click image for larger version

Name:	1.JPG
Views:	151
Size:	10.4 KB
ID:	52416  
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-25-2009 , 10:32   Re: ED_Alloc: no free edicts
Reply With Quote #10

Did you do the change I said above ?
__________________
Arkshine is offline
Reply



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 17:34.


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