Raised This Month: $ Target: $400
 0% 

cs_set_user_team crashes server?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shino
Senior Member
Join Date: May 2006
Old 05-27-2006 , 16:18   cs_set_user_team crashes server?
Reply With Quote #1

i use this code:
Code:
public MakeBots(players[]) {     new players[32],num,i     get_players(players,num)     for(i = 0; i <= num; i++) {         new id = players[i]         new CsArmorType:ArmorType         if (is_user_alive(id) && is_user_bot(id)) {             set_user_health(id,get_cvar_num("amx_zombiebot_health"))             cs_set_user_armor(id,get_cvar_num("amx_zombiebot_armor"),ArmorType)             cs_set_user_model(id,"zombie")             }         }     return PLUGIN_CONTINUE }

after few seconds in game, server crashes with ED_Alloc: no free edicts error. i read somewhere in this forum, that reasons could be too many entities created or some entity handle was leaked, so it was never freed, and they kept building up.
i am almost sure that error occures because cs_set_user_armor. how could i fix that? thanks
shino is offline
 


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 16:28.


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