AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved Hook Plugin for BaseBuilder (https://forums.alliedmods.net/showthread.php?t=265453)

joy0406 06-28-2015 05:09

Hook Plugin for BaseBuilder
 
Guys i need some one to make a Hook Plugin for BaseBuilder mod ....
Such that only CT receive the Hook that too for the construction period only (2 mins)

Sorry for my bad English thanks in advance :oops:

MaSTeR64 06-28-2015 15:36

Re: Hook Plugin for BaseBuilder
 
Quote:

Originally Posted by joy0406 (Post 2313013)
Guys i need some one to make a Hook Plugin for BaseBuilder mod ....
Such that only CT receive the Hook that too for the construction period only (2 mins)

Sorry for my bad English thanks in advance :oops:

Wait... You want somebody to make you a private plugin for FREE? Dont think somebody will do this for free...

joy0406 06-29-2015 01:50

Re: Hook Plugin for BaseBuilder
 
Quote:

Originally Posted by MaSTeR64 (Post 2313229)
Wait... You want somebody to make you a private plugin for FREE? Dont think somebody will do this for free...

Sorry i dint know that it was a private plug .... Btw from whom can i get it ?? Is it for sale ?

indraraj striker 06-29-2015 10:28

Re: Hook Plugin for BaseBuilder
 
Quote:

Originally Posted by MaSTeR64 (Post 2313229)
Wait... You want somebody to make you a private plugin for FREE? Dont think somebody will do this for free...

this is suggestion/request section i can request for a new plugin if you are able to write then comment
whatever its a paid or free

joy0406 06-30-2015 02:38

Re: Hook Plugin for BaseBuilder
 
So now can anyone make such plugin for me :| plz ....

ILUSYON 01-05-2017 07:15

Re: Hook Plugin for BaseBuilder
 
HI! Romania power <3
Quote:

#include <amxmodx>
#include <engine>


/* Tirant Zombie Base Builder or Veco Zombie Base Builder */

#define USE_TIRANT_ZBB
//#define USE_VECO_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_bHook[ 33 ];

new gHookOrigins[ 33 ][ 3 ];

new g_iHook;

new const g_szPrefix[ ] = "Your Prefix Here";

public plugin_init( )
{
register_plugin( "[ ZBB Addon ] Hook", "1.0", "One Above All" );

register_clcmd( "+hook", "hook_on" );
register_clcmd( "-hook", "hook_off" );
}
public plugin_precache( )
{
g_iHook = precache_model( "sprites/zbb/hook.spr" );
}
public hook_on( id )
{
if ( !(get_user_flags( id ) & ADMIN_BAN) && !IsBuildPhase( ) )
{
ColorMessage( id, "Only^3 Admins^1 can use hook after build phase." );
return PLUGIN_HANDLED;
}
if ( get_user_team( id ) != 2 )
{
ColorMessage( id, "Only^3 Counter-Terrorists^1 can use hook!" );
return PLUGIN_HANDLED;
}
if ( IsBuildPhase() || get_user_flags( id ) & ADMIN_BAN && !IsBuildPhase())
{
get_user_origin( id, gHookOrigins[ id ], 3 );
g_bHook[ id ] = true;
set_task( 0.1, "hook_task", id, "", 0, "ab" );
hook_task( id );
}
return PLUGIN_HANDLED;
}
public hook_off( id )
{
remove_hook( id );
return PLUGIN_HANDLED;
}
public hook_task( id )
{
if( !is_user_connected( id ) || !is_user_alive( id ) )
remove_hook( id );

remove_beam( id );
draw_hook( id );
new iOrigin[ 3 ], Float:fVelocity[ 3 ];

get_user_origin( id, iOrigin );
new iDistance = get_distance( gHookOrigins[ id ], iOrigin);
if ( iDistance > 25 )
{
fVelocity[ 0 ] = ( gHookOrigins[ id ][ 0 ] - iOrigin[ 0 ] ) * ( 2.0 * 300 / iDistance );
fVelocity[ 1 ] = ( gHookOrigins[ id ][ 1 ] - iOrigin[ 1 ] ) * ( 2.0 * 300 / iDistance );
fVelocity[ 2 ] = ( gHookOrigins[ id ][ 2 ] - iOrigin[ 2 ] ) * ( 2.0 * 300 / iDistance );
entity_set_vector( id, EV_VEC_velocity, fVelocity );
}
else
{
entity_set_vector( id, EV_VEC_velocity, Float:{0.0,0.0,0.0} );
remove_hook( id );
}
}
public draw_hook( id )
{
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( 1 ); // TE_BEAMENTPOINT
write_short( id ); // Entity index
write_coord( gHookOrigins[ id ][ 0 ] ); // Origin
write_coord( gHookOrigins[ id ][ 1 ] ); // Origin
write_coord( gHookOrigins[ id ][ 2 ] ); // Origin
write_short( g_iHook ); // Sprite index
write_byte( 0 ); // Start frame
write_byte( 0 ); // Framerate
write_byte( 100 ); // Life
write_byte( 10 ); // Width
write_byte( 0 ); // Noise
write_byte( random_num(0, 255) ); // Red
write_byte( random_num(0, 255) ); // Green
write_byte( random_num(0, 255) ); // Blue
write_byte( 250 ); // Brightness
write_byte( 1 ); // Speed
message_end( );
}
public remove_hook( id )
{
if( task_exists( id ) )
remove_task( id );

remove_beam(id);
g_bHook[ id ] = false;
}
public remove_beam(id)
{
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( 99 );
write_short( id );
message_end( );
}
stock ColorMessage( const id, const input[ ], any:... )
{
new iCount = 1, iPlayers[ 32 ];
static szMessage[ 191 ];
new iLen = formatex( szMessage, 190, "^4[%s]^1 ", g_szPrefix );
vformat( szMessage[ iLen ], 190-iLen, input, 3 );
if ( id ) iPlayers[ 0 ] = id;
else get_players( iPlayers , iCount , "ch" );

for ( new i = 0; i < iCount; i++ )
{
if ( is_user_connected( iPlayers[ i ] ) )
{
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, iPlayers[ i ] );
write_byte( iPlayers[ i ] );
write_string( szMessage );
message_end( );
}
}
}
Sprites file: click here

Try: 188.214.88.175:27015 :D

OciXCrom 01-05-2017 07:27

Re: Hook Plugin for BaseBuilder
 
Quote:

Originally Posted by ILUSYON (Post 2483746)
HI!
Plugin Hook for BaseBuilder here: https://www.extreamcs.com/forum/amxm...n-t332794.html

Wow! You are so smart!


All times are GMT -4. The time now is 11:53.

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