Raised This Month: $ Target: $400
 0% 

not enough edicts


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 03-16-2006 , 16:58   not enough edicts
Reply With Quote #1

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")         }     } }
Attached Files
File Type: sma Get Plugin or Get Source (remove_esf_attacks.sma - 770 views - 8.1 KB)
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 03-16-2006 , 17:26  
Reply With Quote #2

compile errors or in game?
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 03-17-2006 , 02:37  
Reply With Quote #3

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
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 03-17-2006 , 03:13  
Reply With Quote #4

that just means you ran out of entities. so you gotta lower on your give_item (your going over the entity limit)
Freecode is offline
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 03-17-2006 , 04:04  
Reply With Quote #5

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 ?
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
Zenith77
Veteran Member
Join Date: Aug 2005
Old 03-17-2006 , 14:57  
Reply With Quote #6

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.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 03-17-2006 , 17:15  
Reply With Quote #7

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 ?
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
souless_sinz
Junior Member
Join Date: Mar 2006
Old 03-18-2006 , 18:56  
Reply With Quote #8

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 .. well run alday aslong as hlds crash dont pop up lol.. peace help him plz! im nub donno how to do plugins yet
souless_sinz is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 03-18-2006 , 19:05  
Reply With Quote #9

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.
Freecode is offline
BAILOPAN
Join Date: Jan 2004
Old 03-18-2006 , 19:18  
Reply With Quote #10

the entity limit is actually closer to 1,000
__________________
egg
BAILOPAN 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 16:34.


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