Raised This Month: $51 Target: $400
 12% 

hook


Post New Thread Reply   
 
Thread Tools Display Modes
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 04-25-2020 , 03:55   Re: hook
Reply With Quote #11

Quote:
Originally Posted by amirwolf View Post
I don't see a difference
You don't see the difference
alferd is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 04-25-2020 , 04:27   Re: hook
Reply With Quote #12

Quote:
Originally Posted by amirwolf View Post
Does not work
Try this plugin Created only for Zombie basebuilder Mod
PHP Code:
#include <amxmodx>
#include <engine>


/* Tirant Zombie Base Builder or Veco Zombie Base Builder */
 
#define USE_TIRANT_ZBB
 
#if defined USE_TIRANT_ZBB
    #include <basebuilder>
    #define IsBuildPhase() bb_is_build_phase()
#endif
 
#if defined USE_VECO_ZBB
    #include <vzbb_mod>
    #define IsBuildPhase() user_can_build()
#endif
 
new bool:g_bHook33 ];
 
new 
gHookOrigins33 ][ ];
 
new 
g_iHook;
 
new const 
g_szPrefix[ ] = "[BaseBuilder]";
 
public 
plugin_init( )
{
    
register_plugin"Hook""1.0""One Above All" );
   
    
register_clcmd"+hook""hook_on" );
    
register_clcmd"-hook""hook_off" );
}
public 
plugin_precache( )
{  
    
g_iHook precache_model"sprites/hook.spr" );
}
public 
hook_onid )
{
    if ( !(
get_user_flagsid ) & ADMIN_RCON) && !IsBuildPhase( ) )
    {
        
ColorMessageid"Only^3 Admins^1 can use hook after build phase." );
        return 
PLUGIN_HANDLED;
    }
    if ( 
get_user_teamid ) != )
    {
        
ColorMessageid"Only^3 Counter-Terrorists^1 can use hook!" );
        return 
PLUGIN_HANDLED;
    }
    if ( 
IsBuildPhase() || get_user_flagsid ) & ADMIN_RCON && !IsBuildPhase())
    {
        
get_user_originidgHookOriginsid ], );
        
g_bHookid ] = true;
        
set_task0.1"hook_task"id""0"ab" );
        
hook_taskid );
    }
    return 
PLUGIN_HANDLED;
}
public 
hook_offid )
{
    
remove_hookid );
    return 
PLUGIN_HANDLED;
}
public 
hook_taskid )
{
    if( !
is_user_connectedid ) || !is_user_aliveid ) )
        
remove_hookid );
   
    
remove_beamid );
    
draw_hookid );
    new 
iOrigin], Float:fVelocity];
   
    
get_user_originidiOrigin );
    new 
iDistance get_distancegHookOriginsid ], iOrigin);
    if ( 
iDistance 25 )
    {
        
fVelocity] = ( gHookOriginsid ][ ] - iOrigin] ) * ( 2.0 300 iDistance );
        
fVelocity] = ( gHookOriginsid ][ ] - iOrigin] ) * ( 2.0 300 iDistance );
        
fVelocity] = ( gHookOriginsid ][ ] - iOrigin] ) * ( 2.0 300 iDistance );
        
entity_set_vectoridEV_VEC_velocityfVelocity );
    }
    else
    {
        
entity_set_vectoridEV_VEC_velocityFloat:{0.0,0.0,0.0} );
        
remove_hookid );
    }
}
public 
draw_hookid )
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byte);                // TE_BEAMENTPOINT
    
write_shortid );          // Entity index
    
write_coordgHookOriginsid ][ ] );     // Origin
    
write_coordgHookOriginsid ][ ] );     // Origin
    
write_coordgHookOriginsid ][ ] );     // Origin
    
write_shortg_iHook );             // Sprite index
    
write_byte);                // Start frame
    
write_byte);                // Framerate
    
write_byte100 );          // Life
    
write_byte10 );           // Width
    
write_byte);                // Noise
    
write_byterandom_num(0255) );       // Red
    
write_byterandom_num(0255) );       // Green
    
write_byterandom_num(0255) );       // Blue
    
write_byte250 );          // Brightness
    
write_byte);                // Speed
    
message_end( );
}
public 
remove_hookid )
{
    if( 
task_existsid ) )
        
remove_taskid );
       
    
remove_beam(id);
    
g_bHookid ] = false;
}
public 
remove_beam(id)
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byte99 );
    
write_shortid );
    
message_end( );
}
stock ColorMessage( const id, const input[ ], any:... )
{
    new 
iCount 1iPlayers32 ];
    static 
szMessage191 ];
    new 
iLen formatexszMessage190"^4[%s]^1 "g_szPrefix );
    
vformatszMessageiLen ], 190-iLeninput);
    if ( 
id iPlayers] = id;
    else 
get_playersiPlayers iCount "ch" );
   
    for ( new 
0iCounti++ )
    {
        if ( 
is_user_connectediPlayers] ) )
        {
            
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ), _iPlayers] );
            
write_byteiPlayers] );
            
write_stringszMessage );
            
message_end( );
        }
    }

Supremache is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 04-25-2020 , 04:37   Re: hook
Reply With Quote #13

Quote:
Originally Posted by Supremache View Post
Try this plugin Created only for Zombie basebuilder Mod
PHP Code:
#include <amxmodx>
#include <engine>


/* Tirant Zombie Base Builder or Veco Zombie Base Builder */
 
#define USE_TIRANT_ZBB
 
#if defined USE_TIRANT_ZBB
    #include <basebuilder>
    #define IsBuildPhase() bb_is_build_phase()
#endif
 
#if defined USE_VECO_ZBB
    #include <vzbb_mod>
    #define IsBuildPhase() user_can_build()
#endif
 
new bool:g_bHook33 ];
 
new 
gHookOrigins33 ][ ];
 
new 
g_iHook;
 
new const 
g_szPrefix[ ] = "[BaseBuilder]";
 
public 
plugin_init( )
{
    
register_plugin"Hook""1.0""One Above All" );
   
    
register_clcmd"+hook""hook_on" );
    
register_clcmd"-hook""hook_off" );
}
public 
plugin_precache( )
{  
    
g_iHook precache_model"sprites/hook.spr" );
}
public 
hook_onid )
{
    if ( !(
get_user_flagsid ) & ADMIN_RCON) && !IsBuildPhase( ) )
    {
        
ColorMessageid"Only^3 Admins^1 can use hook after build phase." );
        return 
PLUGIN_HANDLED;
    }
    if ( 
get_user_teamid ) != )
    {
        
ColorMessageid"Only^3 Counter-Terrorists^1 can use hook!" );
        return 
PLUGIN_HANDLED;
    }
    if ( 
IsBuildPhase() || get_user_flagsid ) & ADMIN_RCON && !IsBuildPhase())
    {
        
get_user_originidgHookOriginsid ], );
        
g_bHookid ] = true;
        
set_task0.1"hook_task"id""0"ab" );
        
hook_taskid );
    }
    return 
PLUGIN_HANDLED;
}
public 
hook_offid )
{
    
remove_hookid );
    return 
PLUGIN_HANDLED;
}
public 
hook_taskid )
{
    if( !
is_user_connectedid ) || !is_user_aliveid ) )
        
remove_hookid );
   
    
remove_beamid );
    
draw_hookid );
    new 
iOrigin], Float:fVelocity];
   
    
get_user_originidiOrigin );
    new 
iDistance get_distancegHookOriginsid ], iOrigin);
    if ( 
iDistance 25 )
    {
        
fVelocity] = ( gHookOriginsid ][ ] - iOrigin] ) * ( 2.0 300 iDistance );
        
fVelocity] = ( gHookOriginsid ][ ] - iOrigin] ) * ( 2.0 300 iDistance );
        
fVelocity] = ( gHookOriginsid ][ ] - iOrigin] ) * ( 2.0 300 iDistance );
        
entity_set_vectoridEV_VEC_velocityfVelocity );
    }
    else
    {
        
entity_set_vectoridEV_VEC_velocityFloat:{0.0,0.0,0.0} );
        
remove_hookid );
    }
}
public 
draw_hookid )
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byte);                // TE_BEAMENTPOINT
    
write_shortid );          // Entity index
    
write_coordgHookOriginsid ][ ] );     // Origin
    
write_coordgHookOriginsid ][ ] );     // Origin
    
write_coordgHookOriginsid ][ ] );     // Origin
    
write_shortg_iHook );             // Sprite index
    
write_byte);                // Start frame
    
write_byte);                // Framerate
    
write_byte100 );          // Life
    
write_byte10 );           // Width
    
write_byte);                // Noise
    
write_byterandom_num(0255) );       // Red
    
write_byterandom_num(0255) );       // Green
    
write_byterandom_num(0255) );       // Blue
    
write_byte250 );          // Brightness
    
write_byte);                // Speed
    
message_end( );
}
public 
remove_hookid )
{
    if( 
task_existsid ) )
        
remove_taskid );
       
    
remove_beam(id);
    
g_bHookid ] = false;
}
public 
remove_beam(id)
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byte99 );
    
write_shortid );
    
message_end( );
}
stock ColorMessage( const id, const input[ ], any:... )
{
    new 
iCount 1iPlayers32 ];
    static 
szMessage191 ];
    new 
iLen formatexszMessage190"^4[%s]^1 "g_szPrefix );
    
vformatszMessageiLen ], 190-iLeninput);
    if ( 
id iPlayers] = id;
    else 
get_playersiPlayers iCount "ch" );
   
    for ( new 
0iCounti++ )
    {
        if ( 
is_user_connectediPlayers] ) )
        {
            
message_beginMSG_ONE_UNRELIABLEget_user_msgid"SayText" ), _iPlayers] );
            
write_byteiPlayers] );
            
write_stringszMessage );
            
message_end( );
        }
    }

Yes, I've tried it before
But it doesn't work properly
Anyway, thank you
amirwolf is offline
Old 04-26-2020, 03:34
amirwolf
This message has been deleted by amirwolf.
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 03:22.


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