Raised This Month: $ Target: $400
 0% 

get a forward that give me "ent" (like FM_spawn) every round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ScHrAnZ DiNgEnS
Senior Member
Join Date: Sep 2007
Old 03-28-2009 , 15:00   get a forward that give me "ent" (like FM_spawn) every round
Reply With Quote #1

I am a beginner on coding plugins, so i hope someone can help me.

I make a little plugin that destroy some "func_breakable" ents on FM_spawn.
Here is the code that destroy the ents on FM_spawn:

PHP Code:
register_forward(FM_Spawn"fwd_Spawn")

public 
fwd_Spawn(ent) {
    
    
///if(enable == false)
    //    return FMRES_IGNORED
    
    
if(!pev_valid(ent))
        return 
FMRES_IGNORED
    
    
static ClassName[32], isize
    pev
(entpev_classnameClassName31)
    
size sizeof(g_RemovedEntities)
    for(
i=0sizei++)
    {
        if(
equali(ClassNameg_RemovedEntities[i]))
        {
            
//check for bomb explosion entity like boxes and dont remove them
            
if(pev(entpev_spawnflags) != 1)
            {
                
entity_set_float(entEV_FL_takedamage0.0)
                
//engfunc(EngFunc_RemoveEntity, ent);
                
return FMRES_SUPERCEDE
            
}
        }
    }
    return 
FMRES_IGNORED

The code works for me, but how can i get working it on roundstart? roundstart never give me an "ent" like FM_spawn. Can someone help me pls to make it possible?

I know that i can remove the ents on FM_spawn and there will never come back, but thats not that what i want. I need to remove ents only for some rounds.

Greetz,
ScHrAnZ DiNgEnS

PS: Sorry for my bad english, i hope you can understand me =)
ScHrAnZ DiNgEnS is offline
Send a message via ICQ to ScHrAnZ DiNgEnS Send a message via AIM to ScHrAnZ DiNgEnS
 


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 08:51.


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