Raised This Month: $ Target: $400
 0% 

find_ent_by_class problems


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shino
Senior Member
Join Date: May 2006
Old 05-22-2006 , 11:16   find_ent_by_class problems
Reply With Quote #1

here's my little issue:

Code:
public WeaponDrop(id) {     engclient_cmd(id,"drop","weapon_usp")     set_task(0.1,"DeleteUSP") } public DeleteUSP() {     new USP,szModel[33]     while ((USP = find_ent_by_class(-1, "weapon_usp")) != 0)     {         entity_get_string(USP, EV_SZ_model, szModel, 32)         if (equali(szModel, "models/w_usp.mdl"))         {             remove_entity(USP)             return PLUGIN_CONTINUE         }     }         return PLUGIN_CONTINUE }

as soon usp is dropped, the remove task performs and the server crashes. any suggestions?
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:31.


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