Raised This Month: $ Target: $400
 0% 

help with error: ED_Alloc: no free adicts


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-10-2009 , 20:34   help with error: ED_Alloc: no free adicts
Reply With Quote #1

I have this code, and my problem is that when opening the server, i see an error: ED_Alloc: no free adicts

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>

#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))

new kf_enableg_maxplayers

public plugin_init()
{
    
register_plugin("Knife Fight""0.1""alan_el_more")
    
register_clcmd("say /kf""cmdkf")
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
RegisterHam(Ham_Touch"weaponbox""fw_TouchWeapon")
    
RegisterHam(Ham_Touch"armoury_entity""fw_TouchWeapon")
    
RegisterHam(Ham_Touch"weapon_shield""fw_TouchWeapon")
    
g_maxplayers get_maxplayers()
}

public 
cmdkf(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))
    {
        
client_print(idprint_chat"[KF] %L"LANG_PLAYER"CMD_NOT ")
        return 
PLUGIN_HANDLED;
    }
    
    if(
kf_enable)
    {
        
client_print(idprint_chat"[KF] %L"LANG_PLAYER"ALREADY_ENABLE")
        return 
PLUGIN_HANDLED;
    }
    
    static 
name[32]
    
get_user_name(idname31)
    
set_hudmessage(255000.30.010.05.01.01.0, -1)
    
show_hudmessage(0"[KF] %L"LANG_PLAYER"HUD_ENABLE"name)
    
kf_enable true
    
return PLUGIN_CONTINUE
}

public 
event_round_start()
{
    if(!
kf_enable) return PLUGIN_HANDLED
    
    set_hudmessage
(255000.30.010.05.01.01.0, -1)
    
show_hudmessage(0"[KF] %L"LANG_PLAYER"HUD_KF")
    
    for(new 
id 1id <= g_maxplayersid++)
    {
        if(
is_user_alive(id))
        {
            
fm_strip_user_weapons(id)
            
fm_give_item(id"weapon_knife")
        }
    }
    
    
kf_enable false
        
    
return PLUGIN_CONTINUE
}

public 
fw_TouchWeapon(weaponid)
{
    if (!
is_user_connected(id))
        return 
HAM_IGNORED;
    
    if (
kf_enable && !is_user_bot(id))
        return 
HAM_SUPERCEDE;
    
    return 
HAM_IGNORED;
}

stock fm_give_item(id, const item[])
{
    static 
ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocStringitem))
    if (!
pev_valid(ent)) return;
    
    static 
Float:originF[3]
    
pev(idpev_originoriginF)
    
set_pev(entpev_originoriginF)
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN)
    
dllfunc(DLLFunc_Spawnent)
    
    static 
save
    save 
pev(entpev_solid)
    
dllfunc(DLLFunc_Touchentid)
    if (
pev(entpev_solid) != save)
        return;
    
    
engfunc(EngFunc_RemoveEntityent)
}

stock fm_strip_user_weapons(index
{
    new 
ent fm_create_entity("player_weaponstrip");
    if (!
pev_valid(ent))
    return 
0;
    
    
dllfunc(DLLFunc_Spawnent);
    
dllfunc(DLLFunc_Useentindex);
    
engfunc(EngFunc_RemoveEntityent);
    
    return 
1;

thanks in advance
__________________
alan_el_more is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-10-2009 , 21:05   Re: help with error: ED_Alloc: no free adicts
Reply With Quote #2

I don't see any problem here ...
Try adding in the HLDS shortcut this: -num edicts 4096 (like maxplayers).
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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 02:28.


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