Raised This Month: $ Target: $400
 0% 

Removing map entitys


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Enomine
Junior Member
Join Date: Apr 2012
Old 05-03-2012 , 05:48   Removing map entitys
Reply With Quote #1

I don't know what is the problem, but doesn't work :\

Code:
//Global new const MapEntitys[] = {     "func_bomb_target",     "info_bomb_target",     "hostage_entity",     "monster_scientist",     "func_hostage_rescue",     "info_hostage_rescue",     "info_vip_start",     "func_vip_safetyzone",     "func_escapezone",     "armoury_entity",     "game_player_equip",     "player_weaponstrip" }; //Init     register_forward(FM_Spawn, "fwdSpawn"); public fwdSpawn(Ent) {     if(pev_valid(Ent))     {         set_task(0.1,"cmdRemoveEnt",Ent+TASK_ENTITYS);         return FMRES_HANDLED;     }         return FMRES_IGNORED; } //-----------------------------// public cmdRemoveEnt(Ent) {     Ent -= TASK_ENTITYS;         if(!pev_valid(Ent))         return PLUGIN_HANDLED;             new EntClass[32];     entity_get_string(Ent, EV_SZ_classname, EntClass, charsmax(EntClass));         for(new i = 0;i < charsmax(MapEntitys);i++)     {         if(equali(EntClass, MapEntitys[i]))         {             engfunc(EngFunc_RemoveEntity, Ent);             break;         }     }         return PLUGIN_HANDLED; }

Last edited by Enomine; 05-03-2012 at 06:16.
Enomine is offline
 



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 00:27.


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