Raised This Month: $ Target: $400
 0% 

Remove bullet holes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lazarev
Veteran Member
Join Date: Sep 2008
Old 03-20-2010 , 09:32   Remove bullet holes
Reply With Quote #1

How?
lazarev is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-20-2010 , 09:35   Re: Remove bullet holes
Reply With Quote #2

AFAIK, you can not remove specific decals but you can remove all the decals in a map at once.
__________________
Arkshine is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 03-20-2010 , 10:11   Re: Remove bullet holes
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Decal Remover"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define FEV_RELIABLE (1<<1)
#define FEV_GLOBAL (1<<2)

new g_iDecalReset
new g_iTaskEnt

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterTask()

    
g_iDecalReset engfunc(EngFunc_PrecacheEvent1"events/decal_reset.sc")
}

RegisterTask()
{
    new 
iEnt
    
new iMaxEnts global_get(glb_maxEntities)
    new 
szClassName[2]
    
// without amxx, the ent id is maxplayers + 1
    // but if a plugin creates some entities during precache it won't
    // so use this code to retrieve the ent
    
for(iEnt get_maxplayers() + 1iEnt<iMaxEntsiEnt++)
    {
        if( 
pev_valid(iEnt) )
        {
            
pev(iEntpev_classnameszClassNamecharsmax(szClassName))
            if( !
szClassName[0] )
            {
                
g_iTaskEnt iEnt
                RegisterHamFromEntity
(Ham_ThinkiEnt"Task_RemoveDecals"1)
                return
            }
        }
    }
}

public 
Task_RemoveDecalsiEnt )
{
    if( 
iEnt != g_iTaskEnt )
    {
    
/*    new szClassName[32]
        pev(iEnt, pev_classname, szClassName, charsmax(szClassName))
        log_to_file("ClassLessEnt", szClassName)*/
        
return
    }

    static 
iCount
    
if( ++iCount 15 == )
    {
        
engfunc(EngFunc_PlaybackEventFEV_RELIABLE|FEV_GLOBAL0g_iDecalReset0.0Float:{0.00.00.0}, Float:{0.00.00.0}, 0.00.00000)
    }

KadiR is offline
Reply



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:47.


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