AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   not enough edicts (https://forums.alliedmods.net/showthread.php?t=25595)

SSJ2GOKU 03-16-2006 16:58

not enough edicts
 
1 Attachment(s)
can anybody take a look to the code i added below
i keep on getting errors like the topic title

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #define PLUGIN "Remove_attacks" #define VERSION "1.0" #define AUTHOR "SSJ2GOKU" new PlayerForm[33] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_cvar("amx_esf_onlybeams","0")         register_cvar("amx_esf_disc","0")     register_cvar("amx_esf_kiblob","0")     register_cvar("amx_esf_laser","0")     register_cvar("amx_esf_melee","0")     register_cvar("amx_esf_rocks","0")     register_cvar("amx_esf_SBC","0")         register_event("ResetHUD","playerSpawn","b") } public playerSpawn(id){     PlayerForm[id] = entity_get_int(id, EV_INT_modelindex)         set_task(0.1,"Weapons",id) } public Weapons(id){     new modelIndex = entity_get_int(id, EV_INT_modelindex)             if (get_cvar_num("amx_esf_onlybeams")==1){ //Shooting attack.         strip_user_weapons(id)         give_weapons(id)                 if (modelIndex != PlayerForm[id]){             add_higherlevel_weapons(id)         }     } } public give_weapons(id){     new playerclass = entity_get_int(id,EV_INT_playerclass)     new modelIndex = entity_get_int(id, EV_INT_modelindex)         switch (playerclass){         case 1:{ // BUU             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_mouthblast")   // MOUTHBLAST             give_item(id,"weapon_regeneration") // REGENERATION             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 2:{ // GOKU             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_kamehameha")   // KAMEHAMEHA                         if(PlayerForm[id] != modelIndex){                 give_item(id,"weapon_spiritbomb")   // SPIRIT BOMB             }                         give_item(id,"weapon_solarflare")   // SOLAR FLARE             give_item(id,"weapon_kametorpedo")  // KAME TORPEDO             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 3:{ // GOHAN             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_shieldattack") // SHIELD             give_item(id,"weapon_powerbeam")    // POWER BEAM             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 4:{ // KRILLEN             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_kamehameha")   // KAMEHAMEHA             give_item(id,"weapon_solarflare")   // SOLAR FLARE                         if(PlayerForm[id] != modelIndex){                 give_item(id,"weapon_scatterbeam")  // SCATTER BEAM             }                         give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 5:{ // FRIEZA             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 6:{ // PICCOLO             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_masenko")      // MASENKO             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 7:{ // TRUNKS             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_burningattack")    // BURNING ATTACK             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 8:{ // VEGETA             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_gallitgun")    // GALLIT GUN             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }         case 9:{ // CELL             give_item(id,"weapon_genericbeam")  // GENERIC BEAM             give_item(id,"weapon_kamehameha")   // KAMEHAMEHA             give_item(id,"weapon_solarflare")   // SOLARFLARE             give_item(id,"weapon_sensu")        // SENSU BEANS             give_item(id,"item_sensubeanbag")   // SENSU BAG         }     } } public add_forbidden_items(id){     new playerclass = entity_get_int(id,EV_INT_playerclass)         if(get_cvar_num("amx_esf_onlybeams")==0){         switch (playerclass){             case 1:{ // BUU                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }                 if(get_cvar_num("amx_esf_laser")==0){                     give_item(id,"weapon_candy")        // CANDY LASER                 }             }             case 2:{ // GOKU                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }             }             case 3:{ // GOHAN                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }             }             case 4:{ // KRILLEN                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }                 if(get_cvar_num("amx_esf_disc")==0){                     give_item(id,"weapon_destructodisc")    // DESTRUCTO DISC                 }             }             case 5:{ // FRIEZA                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }                 if(get_cvar_num("amx_esf_disc")==0){                     give_item(id,"weapon_friezadisc")   // FRIEZA DISC                 }                 if(get_cvar_num("amx_esf_laser")==0){                     give_item(id,"weapon_fingerlaser")  // FINGER LASER                 }                 if(get_cvar_num("amx_esf_rocks")==0){                     give_item(id,"weapon_telekinesis")                 }             }             case 6:{ // PICCOLO                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }                 if(get_cvar_num("amx_esf_SBC")==0){                     give_item(id,"weapon_specialbeamcannon")// SBC                 }                 if(get_cvar_num("amx_esf_laser")==0){                     give_item(id,"weapon_eyelaser")     // EYE LASER                 }             }             case 7:{ // TRUNKS                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }             }             case 8:{ // VEGETA                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_renzoku")      // RENZOKU                 }             }             case 9:{ // CELL                 if(get_cvar_num("amx_esf_melee")==0){                     give_item(id,"weapon_melee")        // MELEE                 }                 if(get_cvar_num("amx_esf_kiblob")==0){                     give_item(id,"weapon_kiblast")      // KIBLAST                 }                 if(get_cvar_num("amx_esf_SBC")==0){                     give_item(id,"weapon_specialbeamcannon")// SBC                 }                 if(get_cvar_num("amx_esf_disc")==0){                     give_item(id,"weapon_friezadisc")   // FRIEZA DISC                 }             }         }     } } public add_higherlevel_weapons(id){     new playerclass = entity_get_int(id, EV_INT_playerclass)         switch (playerclass){         case 1:{ // BUU                     }         case 2:{ // GOKU                     }         case 3:{ // GOHAN             give_item(id,"weapon_kamehameha")         }         case 4:{ // KRILLEN                     }         case 5:{ // FRIEZA             give_item(id,"weapon_deathball")         }         case 6:{ // PICCOLO                     }         case 7:{ // TRUNKS             give_item(id,"weapon_finishingbuster")         }         case 8:{ // VEGETA             give_item(id,"weapon_bigbang")             give_item(id,"weapon_finalflash")         }         case 9:{ // CELL             give_item(id,"weapon_gallitgun")         }     } }

SweatyBanana 03-16-2006 17:26

compile errors or in game?

SSJ2GOKU 03-17-2006 02:37

ingame when the main cvar

"amx_esf_onlybeams 1" is called

the game closes down and sometimes it gives a FATAL ERROR which describes something about not enough edicts

but i really dont see anything in this plugin that would cause a shutdown, because it's only removing and adding attacks to players

this plugin should run each time a player spawns so that the player only have certain weapons, depending on the cvars

Freecode 03-17-2006 03:13

that just means you ran out of entities. so you gotta lower on your give_item (your going over the entity limit)

SSJ2GOKU 03-17-2006 04:04

err its in no way possible to give an oversize of items pall

the esf_giveattacks plugin is doing the same stuff, and there is no limit on that one ???

esf_giveattacks link: http://forums.alliedmods.net/showthread.php?p=18430

or do you guys know another way of giving weapons to players after you stripped them ?

Zenith77 03-17-2006 14:57

Umm the HL entity limit is 500.
Weapons count as an entity, therefore need edicts to point to them, and once you run out, goodbye.

SSJ2GOKU 03-17-2006 17:15

Quote:

Originally Posted by Zenith77
Umm the HL entity limit is 500.
Weapons count as an entity, therefore need edicts to point to them, and once you run out, goodbye.

but err, with that other plugin it adds even more attacks then i do
so why dont i run out of entitys then ???

because my plug first strips all the attack and then it readds the attacks that are allowed
=> so less then normally

but does anyone see a mistake in my plug, that would normally cause the no free place ?

souless_sinz 03-18-2006 18:56

no one has any tips for my man goku :( this plugin be a great help this way run my evm server all day without kicking banning people :D.. well run alday aslong as hlds crash dont pop up lol.. peace help him plz! im nub donno how to do plugins yet :shock:

Freecode 03-18-2006 19:05

well when you give weapons it creates entities. So check for any other plugins that might be making entities on your server and disable those.

BAILOPAN 03-18-2006 19:18

the entity limit is actually closer to 1,000


All times are GMT -4. The time now is 16:34.

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