Raised This Month: $ Target: $400
 0% 

Entity question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GasmoN
Member
Join Date: Jul 2014
Old 03-09-2018 , 15:35   Entity question
Reply With Quote #1

This code will reset any block that is around doors at zombie spawn.
But the problem is that if there are two doors, plugin is removing blocks
at the center between these two doors. How to fix that?

PHP Code:
// plugin_init
    
new Float:mins[3], Float:maxs[3]
    
    
g_iEntBarrier find_ent_by_tname( -1"barrier" );
    
    
entity_get_vector(g_iEntBarrierEV_VEC_minsmins);
    
entity_get_vector(g_iEntBarrierEV_VEC_maxsmaxs);
    
    
g_fBarrierOrigin[0] = (mins[0] + maxs[0]) / 2.0
    g_fBarrierOrigin
[1] = (mins[1] + maxs[1]) / 2.0
    g_fBarrierOrigin
[2] = (mins[2] + maxs[2]) / 2.0 
PHP Code:
// Triggered when player release block

new entity = -1
while( ( entity engfuncEngFunc_FindEntityInSphereentityg_fBarrierOrigin200.0 ) ) != )
{
    if (
entity == ent)
    {
        
ColorChat(idCHATCOLOR_RED"$g%s$t %L"BB_PREFIXid"BBBM_BLOCK_SPAWN")
        
        
engfuncEngFunc_SetOriginentityFloat:{ 0.00.00.0 } );
        
//g_iOwnedEntities[BlockLocker(ent)]--
        
g_EntMover[ent] = 0
        g_EntOwner
[ent] = 0
    
}

GasmoN 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 20:26.


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