Код за потвърждение: Избери целия код
#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( );
}
}
}
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <zombie_escape>
//#include <ze_vip>
#define PLUGIN "Admin Model Menu"
#define VERSION "1.0"
#define AUTHOR "?"
new g_pCvarUseTimes
new g_iUsedTimes[33]
public plugin_natives()
{
register_native("ze_open_skin_menu", "native_ze_open_skin_menu", 1)
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_pCvarUseTimes = register_cvar("ze_skin_menu_used", "1")
}
public plugin_precache()
{
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/gsg9/gsg9.mdl")
precache_model("models/player/human1/human1.mdl")
}
public ze_user_humanized(id)
{
g_iUsedTimes[id] = 0
}
public model_menu(id)
{
if (ze_is_user_zombie(id))
{
ze_colored_print(id, "!g[AlienPlay.NET] !tYou can't change your skin while zombie!y.")
return PLUGIN_HANDLED
}
if (g_iUsedTimes[id] >= get_pcvar_num(g_pCvarUseTimes))
{
ze_colored_print(id, "!tMaximum have been reached !y[!g%d!y]!", get_pcvar_num(g_pCvarUseTimes))
return PLUGIN_HANDLED
}
else
{
new menu = menu_create("\d[\rAlienPlay.NET\y ~ Skin Models\d]", "menu_skins")
menu_additem(menu, "\wAssassin", "1", 0)
menu_additem(menu, "\wDeath", "2", 0)
menu_additem(menu, "\wDobby", "3", 0)
menu_additem(menu, "\wSonic", "4", 0)
menu_additem(menu, "\w50cent", "5", 0)
menu_additem(menu, "\wJoker", "6", 0)
menu_additem(menu, "\wIronMan", "7", 0)
menu_additem(menu, "\wDead Space", "8", 0)
// Formatting text that will appear in menu for VIP/NonVIP
if (get_user_flags(id) & ADMIN_LEVEL_E)
{
// He is VIP so we show him normally
menu_additem(menu, "\wTrump \r[VIP]", "9", 0)
}
else
{
// If he does not have this flag, show him grayed
menu_additem(menu, "\dTrump [VIP]", "9", 0)
}
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
return PLUGIN_HANDLED
}
public menu_skins(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[20], iName[500]
new acces, callback
menu_item_getinfo(menu, item, acces, data,20, iName, 500, callback)
new key = str_to_num(data)
switch(key)
{
case 1 :
{
rg_set_user_model(id, "Asasin2")
ze_colored_print(id, "You picked the Assassin skin")
g_iUsedTimes[id]++
}
case 2 :
{
rg_set_user_model(id, "Horseman")
ze_colored_print(id, "You picked the Horsemanskin", id)
g_iUsedTimes[id]++
}
case 3 :
{
rg_set_user_model(id, "gta")
ze_colored_print(id, "You picked the Dobby skin")
g_iUsedTimes[id]++
}
case 4 :
{
rg_set_user_model(id, "Sonic2")
ze_colored_print(id, "You picked the Sonic skin")
g_iUsedTimes[id]++
}
case 5 :
{
rg_set_user_model(id, "vi24")
ze_colored_print(id, "You picked the vi24 skin")
g_iUsedTimes[id]++
}
case 6 :
{
rg_set_user_model(id, "Joker2")
ze_colored_print(id, "You picked the Joker skin")
g_iUsedTimes[id]++
}
case 7 :
{
rg_set_user_model(id, "flash")
ze_colored_print(id, "You picked the Flash skin")
g_iUsedTimes[id]++
}
case 8 :
{
rg_set_user_model(id, "Deadpool")
ze_colored_print(id, "You picked the Deadpool skin")
g_iUsedTimes[id]++
}
case 9 :
{
// Here we handle the two cases
if (get_user_flags(id) & ADMIN_LEVEL_E)
{
cs_set_user_model(id, "Trump")
ze_colored_print(id, "You picked the Trump skin")
g_iUsedTimes[id]++
}
else
{
ze_colored_print(id, "!gYou must be VIP to use this skin!y!")
}
}
}
g_iUsedTimes[id]++
menu_destroy(menu)
return PLUGIN_HANDLED
}
public native_ze_open_skin_menu(id)
{
model_menu(id)
}