AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remove entity by model name? (https://forums.alliedmods.net/showthread.php?t=49963)

hlstriker 01-16-2007 13:57

Remove entity by model name?
 
Hi, is it possible to remove an entity by it's model name?

If so how can I do this? I need this because I know the model name of an entity but not the classname.

teame06 01-16-2007 14:18

Re: Remove entity by model name?
 
Try this native http://www.amxmodx.org/funcwiki.php?go=func&id=348

Edit.

Nevermind. This native you have to use with classname.

[ --<-@ ] Black Rose 01-16-2007 15:55

Re: Remove entity by model name?
 
I'm just guessing. I'm not very good with ents.
Code:
stock FindEntByModel(model[]) {         new ent_model[64]     new ent = get_maxplayers()     new max_ent = engfunc(EngFunc_NumberOfEntities)         while ( ent++ < max_ent ) {         pev(ent, pev_model, ent_model, 63)         if ( equal(model, ent_model) )             return ent     }     return 0; }


All times are GMT -4. The time now is 22:26.

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