Преработка на Hook

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
deadlylord
Извън линия
Потребител
Потребител
Мнения: 572
Регистриран на: 04 Апр 2017, 16:35
Местоположение: Бургас, България
Получена благодарност: 2 пъти
Обратна връзка:

Преработка на Hook

Мнение от deadlylord » 12 Апр 2017, 03:25

Код за потвърждение: Избери целия код

#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[ ] = "Basebuilder 6.5";

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( 2 ); // 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( );
}
}
} 
Искам само хората с r - custom level F да имат достъп до Hook
Последно промяна от deadlylord на 12 Апр 2017, 12:33, променено общо 1 път.

Аватар
SmirnoffBG
Извън линия
Потребител
Потребител
Мнения: 267
Регистриран на: 27 Ное 2016, 19:43
Местоположение: nz
Се отблагодари: 77 пъти
Получена благодарност: 38 пъти
Обратна връзка:

Re: Преработка на Hook

Мнение от SmirnoffBG » 12 Апр 2017, 12:24

пич няма да е зле да дадеш Inc файловете
като basebuilder.inc например
El-Super Respawn = 87.121.54.85:27016
BG Trewa Respawn = 91.92.137.205:27015

Аватар
deadlylord
Извън линия
Потребител
Потребител
Мнения: 572
Регистриран на: 04 Апр 2017, 16:35
Местоположение: Бургас, България
Получена благодарност: 2 пъти
Обратна връзка:

Re: Преработка на Hook

Мнение от deadlylord » 12 Апр 2017, 12:32

SmirnoffBG написа:пич няма да е зле да дадеш Inc файловете
като basebuilder.inc например

Код за потвърждение: Избери целия код

#if defined _basebuilder_included
  #endinput
#endif
#define _basebuilder_included

enum
{
	COLOR_RED = 0, 		//200, 000, 000
	COLOR_REDORANGE, 	//255, 083, 073
	COLOR_ORANGE, 		//255, 117, 056
	COLOR_YELLOWORANGE, 	//255, 174, 066
	COLOR_PEACH, 		//255, 207, 171
	COLOR_YELLOW, 		//252, 232, 131
	COLOR_LEMONYELLOW, 	//254, 254, 034
	COLOR_JUNGLEGREEN, 	//059, 176, 143
	COLOR_YELLOWGREEN, 	//197, 227, 132
	COLOR_GREEN, 		//000, 200, 000
	COLOR_AQUAMARINE, 	//120, 219, 226
	COLOR_BABYBLUE, 		//135, 206, 235
	COLOR_SKYBLUE, 		//128, 218, 235
	COLOR_BLUE, 		//000, 000, 200
	COLOR_VIOLET, 		//146, 110, 174
	COLOR_PINK, 		//255, 105, 180
	COLOR_MAGENTA, 		//246, 100, 175
	COLOR_MAHOGANY,		//205, 074, 076
	COLOR_TAN, 		//250, 167, 108
	COLOR_LIGHTBROWN, 	//234, 126, 093
	COLOR_BROWN, 		//180, 103, 077
	COLOR_GRAY, 		//149, 145, 140
	COLOR_BLACK, 		//000, 000, 000
	COLOR_WHITE 		//255, 255, 255
}

enum
{
	PUSHING = 1,
	PULLING
}

enum
{
	ATT_HEALTH = 0,
	ATT_SPEED,
	ATT_GRAVITY
}

/**
 * Returns whether Base Builder is active.
 */
stock is_basebuilder_active()
{
	if(!cvar_exists("bb_enabled"))
	{
		log_amx("Cvar: ^"bb_enabled^" does not exist.")
		return 0
	}
	return get_cvar_num("bb_enabled")
}

/**
 * Registers a custom class which will be added to the zombie classes menu of BB.
 *
 * Note: The returned zombie class ID can be later used to identify
 * the class when calling the bb_get_user_zombie_class() natives.
 *
 * @param name		Caption to display on the menu.
 * @param info		Brief description of the class.
 * @param model		Player model to be used.
 * @param clawmodel	Claws model to be used.
 * @param hp		Initial health points.
 * @param speed		Maximum speed.
 * @param gravity	Gravity multiplier.
 * @param knockback	Empty value.
 * @param adminflags	Set flag of admin only class, ADMIN_USER is normal players.
 * @param credits	Cost of unlocking this class (if credits is enabled).
 * @return		An internal zombie class ID, or -1 on failure.
 */
native bb_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback = 0.0, adminflags = ADMIN_ALL, credits = 0 )
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback = 0.0, adminflags = ADMIN_ALL, credits = 0 )

/**
 * Returns a zombie classes cost.
 *
 * @param classid	A valid zombie class ID.
 */
native bb_get_class_cost(classid)

/**
 * Returns a player's current zombie class ID.
 *
 * @param id		Player index.
 * @return		Internal zombie class ID, or -1 if not yet chosen.
 */
native bb_get_user_zombie_class(id)
native zp_get_user_zombie_class(id)

/**
 * Returns a player's next zombie class ID (when they respawn).
 *
 * @param id		Player index.
 * @return		Internal zombie class ID, or -1 if not yet chosen.
 */
native bb_get_user_next_class(id)
native zp_get_user_next_class(id)

/**
 * Sets a player's next zombie class ID (when they respawn).
 *
 * @param id		Player index.
 * @param classid	A valid zombie class ID.
 * @return		True on success, false otherwise.
 */
native bb_set_user_zombie_class(id, classid)
native zp_set_user_zombie_class(id, classid)

/**
 * Returns whether a player is a zombie.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native bb_is_user_zombie(id)
native zp_get_user_zombie(id)

/**
 * Returns whether a player is banned from building.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native bb_is_user_banned(id)

/**
 * Returns whether the game is still in the build phase.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native bb_is_build_phase()

/**
 * Returns whether the game is in the preparation phase.
 *
 * @return		True if it is, false otherwise.
 */
native bb_is_prep_phase()

/**
 * Returns the current build time (in seconds).
 */
native bb_get_build_time()

/**
 * Sets the build timer to a specified number.
 *
 * @param time		Time to set build timer to. (integer)
 */
native bb_set_build_time(time)

/**
 * Returns the players current color ENUM.
 *
 * @param id		Player index.
 */
native bb_get_user_color(id)

/**
 * Sets the build timer to a specified number.
 *
 * @param id		Player index.
 * @param color		Color to set. (enum)
 */
native bb_set_user_color(id, color)

/**
 * Drops the users entity (if he has one).
 *
 * @param id		Player index.
 */
native bb_drop_user_block(id)

/**
 * Returns the users entity..
 *
 * @param id		Player index.
 * @return		Entity index if true, 0 if none
 */
native bb_get_user_block(id)

/**
 * Sets the users current moving block to the entity specified.
 *
 * @param id		Player index.
 * @param entity	Entity index.
 */
native bb_set_user_block(id, entity)

/**
 * Returns whether a block is locked or not.
 *
 * @param entity	Entity index.
 * @return		True if it is, false otherwise
 */
native bb_is_locked_block(entity)

/**
 * Locks specified block if applicable.
 *
 * @param entity	Entity index.
 */
native bb_lock_block(entity)

/**
 * Unlocks specified block if applicable.
 *
 * @param entity	Entity index.
 */
native bb_unlock_block(id, entity)

/**
 * Releases the zombies if valid.
 */
native bb_release_zombies()

/**
 * Sets their "primary weapon" (weapon that is drawn at round start).
 *
 * @param id		Player index.
 * @param csw_primary	CSW_ primary to set to from CSW_P228 to CSW_P90.
 */
native bb_set_user_primary(id, csw_gun)

/**
 * Returns their current primary weapon.
 *
 * @param id		Player index.
 * @return		Returns primary weapon as CSW_ constant.
 */
native bb_get_user_primary(id)

/**
 * Returns current mod admin flags for the following
 *
 * @return		Returns the ADMIN flags for specified level
 */
native bb_get_flags_build()
native bb_get_flags_lock()
native bb_get_flags_buildban()
native bb_get_flags_swap()
native bb_get_flags_revive()
native bb_get_flags_guns()
native bb_get_flags_release()
native bb_get_flags_override()

/*------------------------------------------------------------------------------------------------*/

//Disabled until fixed

/**
 * Sets a multiplier for a class (for use with credits add-on)
 *
 * @param id		Player index.
 * @param attribute	Attribute enum to change
 * @param amount	Float value hat will multiply by
 * @return		Returns 1 if successful, 0 if not
 */
//native bb_set_user_mult(id, attribute, Float:amount)
/*------------------------------------------------------------------------------------------------*/

/**
 * Called when the zombies are released
 * at the end of the build or preparation phase
 */
forward bb_round_started()

/**
 * Called when the preparation phase begins
 * at the end of the build phase, before zombie release
 */
forward bb_prepphase_started()

/**
 * Called when the build phase begins
 * When the round starts (logevent)
 */
forward bb_buildphase_started()

/**
 * Called when a player picks his NEXT zombie class
 *
 * @param id		Player index forwarding the event.
 * @param class		Class index picked
 */
forward bb_zombie_class_picked(id, class)

/**
 * Called when a player has his CURRENT class applied. (respawn)
 *
 * @param id		Player index forwarding the event.
 * @param class		Class index picked
 */
forward bb_zombie_class_set(id, class)

/**
 * Called when a player pushes or pulls an entity
 *
 * @param id		Player index forwarding the event.
 * @param entity	The entity index being moved
 * @param pushpull	Whether it's being pushed or pulled
 *			1 = pushing, 2 = pulling
 */
forward bb_block_pushpull(id, entity, pushpull)

/**
 * Called when a player grabs an entity
 *	Before entity successfully grabbed
 *
 * @param id		Player index forwarding the event.
 * @param entity	The entity index being grabbed
 */
forward bb_grab_pre(id, entity)

/**
 * Called when a player grabs an entity
 *	After the entity is grabbed
 *
 * @param id		Player index forwarding the event.
 * @param entity	The entity index being grabbed
 */
forward bb_grab_post(id, entity)

/**
 * Called when a player drops an entity
 *	Before entity actually dropped
 *
 * @param id		Player index forwarding the event.
 * @param entity	The entity index being dropped
 */
forward bb_drop_pre(id, entity)

/**
 * Called when a player drops an entity
 *	After the entity is dropped
 *
 * @param id		Player index forwarding the event.
 * @param entity	The entity index being dropped
 */
forward bb_drop_post(id, entity)

/**
 * Called when a player receives a new color
 *	Only when they random or select from menu
 *
 * @param id		Player index forwarding the event.
 * @param color		The entity index being dropped
 */
forward bb_new_color(id, color)

/**
 * Called when a player locks an entity
 *	Before entity actually locked
 *
 * @param id		Player index forwarding the event.
 * @param entity	The entity index being locked
 */
forward bb_lock_pre(id, entity)

/**
 * Called when a player locks an entity
 *	After the entity is locked
 *
 * @param id		Player index forwarding the event.
 * @param entity	The entity index being locked
 */
forward bb_lock_post(id, entity)
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Заповядай! :)

Аватар
Petrowch0
Извън линия
Потребител
Потребител
Мнения: 220
Регистриран на: 14 Окт 2016, 19:23
Местоположение: de_dust2
Получена благодарност: 3 пъти
Обратна връзка:

Re: Преработка на Hook

Мнение от Petrowch0 » 12 Апр 2017, 14:45

Код за потвърждение: Избери целия код

#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[ ] = "Basebuilder 6.5";

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_LEVEL_F) && !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_LEVEL_F && !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( 2 ); // 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( );
}
}
}
Изображение

Аватар
TheRedShoko
Извън линия
Модератор
Модератор
Мнения: 1016
Регистриран на: 06 Окт 2016, 07:42
Местоположение: Бургас
Се отблагодари: 5 пъти
Получена благодарност: 84 пъти

Re: Преработка на Hook

Мнение от TheRedShoko » 12 Апр 2017, 20:02

Код за потвърждение: Избери целия код

#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[ ] = "Basebuilder 6.5";

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_LEVEL_F || 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( 2 ); // 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( );
}
}
}
SmirnoffBG написа:пич няма да е зле да дадеш Inc файловете
като basebuilder.inc например
За какво по-точно ти трябва?

Аватар
SmirnoffBG
Извън линия
Потребител
Потребител
Мнения: 267
Регистриран на: 27 Ное 2016, 19:43
Местоположение: nz
Се отблагодари: 77 пъти
Получена благодарност: 38 пъти
Обратна връзка:

Re: Преработка на Hook

Мнение от SmirnoffBG » 12 Апр 2017, 21:49

TheRedShoko написа: За какво по-точно ти трябва?
Щото го нямах :Д
А иначе той може да има пипнато inc
El-Super Respawn = 87.121.54.85:27016
BG Trewa Respawn = 91.92.137.205:27015

Аватар
TheRedShoko
Извън линия
Модератор
Модератор
Мнения: 1016
Регистриран на: 06 Окт 2016, 07:42
Местоположение: Бургас
Се отблагодари: 5 пъти
Получена благодарност: 84 пъти

Re: Преработка на Hook

Мнение от TheRedShoko » 12 Апр 2017, 22:11

И все пак промяната по плъгина не зависи от .inc файла.

Аватар
deadlylord
Извън линия
Потребител
Потребител
Мнения: 572
Регистриран на: 04 Апр 2017, 16:35
Местоположение: Бургас, България
Получена благодарност: 2 пъти
Обратна връзка:

Re: Преработка на Hook

Мнение от deadlylord » 14 Апр 2017, 22:43

някой може ли да го напише?

Аватар
TheRedShoko
Извън линия
Модератор
Модератор
Мнения: 1016
Регистриран на: 06 Окт 2016, 07:42
Местоположение: Бургас
Се отблагодари: 5 пъти
Получена благодарност: 84 пъти

Re: Преработка на Hook

Мнение от TheRedShoko » 14 Апр 2017, 22:47

Дадох ти го направен. Какво още искаш?

Аватар
deadlylord
Извън линия
Потребител
Потребител
Мнения: 572
Регистриран на: 04 Апр 2017, 16:35
Местоположение: Бургас, България
Получена благодарност: 2 пъти
Обратна връзка:

Re: Преработка на Hook

Мнение от deadlylord » 14 Апр 2017, 23:04

Извинявай, дори и не бях забелязал, че има промяна в кода .... благодаря, темата може да се заключва

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 22 госта