Raised This Month: $ Target: $400
 0% 

What dose those codes do


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-05-2020 , 14:57   What dose those codes do
Reply With Quote #1

I was searching for codes those can remove c4 bomb from server and when i found one i get many problems so i got this code from zombie plague mod but it's not working with me and What dose those codes do.

zombieplague.ini file
Quote:
[Objective Entities] (and anything that would affect gameplay that needs to be removed)
CLASSNAMES = func_bomb_target , info_bomb_target , info_vip_start , func_vip_safetyzone , func_escapezone , hostage_entity , monster_scientist , func_hostage_rescue , info_hostage_rescue , env_fog , env_rain , env_snow , item_longjump , func_vehicle
PHP Code:
case SECTION_OBJECTIVE_ENTS:
            {
                if (
equal(key"CLASSNAMES"))
                {
                    
// Parse classnames
                    
while (value[0] != && strtok(valuekeycharsmax(key), valuecharsmax(value), ','))
                    {
                        
// Trim spaces
                        
trim(key)
                        
trim(value)
                        
                        
// Add to objective ents array
                        
ArrayPushString(g_objective_entskey)
                    }
                }
            } 


PHP Code:
new Array:g_objective_ents

g_objective_ents 
ArrayCreate(321)

// Prevent some entities from spawning
    
g_fwSpawn register_forward(FM_Spawn"fw_Spawn")

unregister_forward(FM_Spawng_fwSpawn)

// Entity Spawn Forward
public fw_Spawn(entity)
{
    
// Invalid entity
    
if (!pev_valid(entity)) return FMRES_IGNORED;
    
    
// Get classname
    
new classname[32], objective[32], size ArraySize(g_objective_ents)
    
pev(entitypev_classnameclassnamecharsmax(classname))
    
    
// Check whether it needs to be removed
    
for (new 0sizei++)
    {
        
ArrayGetString(g_objective_entsiobjectivecharsmax(objective))
        
        if (
equal(classnameobjective))
        {
            
engfunc(EngFunc_RemoveEntityentity)
            return 
FMRES_SUPERCEDE;
        }
    }
    
    return 
FMRES_IGNORED;

Supremache 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 19:53.


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