AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Hook only on build-time (https://forums.alliedmods.net/showthread.php?t=331865)

Ace67 04-10-2021 17:55

Hook only on build-time
 
Hello, i searching plugin or code for adding only the Hook during the build-time for CT and T the during 150seconds .
I want this only for vip like flags if u can add "T"
I use the version basebuilder 5.4 not 6.5.

raizo11 04-11-2021 00:33

Re: Hook only on build-time
 
try to learn amxmodx becouse 80% of posts in 3 days is yours...and no one pays us to do something..don't take it as an obligation

AND FOR ALL : If your request is for Zombie Mod or another shit , just put in title "ZP HELP" Or something like

Ace67 04-11-2021 08:32

Re: Hook only on build-time
 
Quote:

Originally Posted by raizo11 (Post 2743737)
try to learn amxmodx becouse 80% of posts in 3 days is yours...and no one pays us to do something..don't take it as an obligation

AND FOR ALL : If your request is for Zombie Mod or another shit , just put in title "ZP HELP" Or something like

This is for basebuilder 5.4, please listen my request before type.

Uzviseni Bog 02-24-2023 10:10

Re: Hook only on build-time
 
PHP Code:

#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_bHook33 ];

new 
gHookOrigins33 ][ ];

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_onid )
{
if ( !(
get_user_flagsid ) & ADMIN_LEVEL_H) && !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_LEVEL_H && !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( );
}
}




All times are GMT -4. The time now is 19:56.

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