Descriere: Acesta este un plugin pentru modul Furien, dupa un anumit timp este ales la intamplare un player care este eroul rundei, el primeste niste beneficii fata de cei lalti jucatori care il face mai puternic, si anume are model diferit, primeste Health, Armor, Grenade Pack, Janus-I si Janus-VII .
Autor: Adventx
Sursa (Link-ul oficial): AmxModX/AdminMod:
CVar-uri:
Cod: Selectaţi tot
furien_hero_time 30 - After how long to chose a hero
furien_hero_health 500 - Health
furien_hero_armor 100 - Armor
furien_hero_glow 0 150 0 - Set Hero Glow colors in RGB
- Fakemeta
- DhudMessage
- Hamsandwich
- Fun
Comenzi: -
Instalare: 1. Fisierul nume_plugin.sma il puneti in addons/amxmodx/scripting
2. Fisierul nume_plugin.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod: Selectaţi tot
nume_plugin.amxx
.Sma:
Cod: Selectaţi tot
/* Plugin generated by AMXX-Studio */
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fakemeta >
#include < dhudmessage >
#include < hamsandwich >
#include < fun >
new const PLUGIN[] = "Furien: Hero";
new const VERSION[] = "1.0";
// Models
new const g_szHeroModel[] = "models/player/hero/hero.mdl";
// CVARs
new cvar_hero_time, cvar_hero_health, cvar_hero_armor, cvar_hero_glow;
// Native
native give_weapon_janus1( id )
native give_weapon_janus7( id )
public plugin_precache( )
{
// Precache Model
engfunc( EngFunc_PrecacheModel, g_szHeroModel )
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "Adventx")
// Logevent
register_logevent( "logevent_Round_Start", 2, "1=Round_Start" )
// Ham Forwards
RegisterHam( Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);
// CVARs - Hero
cvar_hero_time = register_cvar( "furien_hero_time", "30" )
cvar_hero_health = register_cvar( "furien_hero_health", "500" )
cvar_hero_armor = register_cvar( "furien_hero_armor", "100" )
cvar_hero_glow = register_cvar( "furien_hero_glow", "0 150 0" )
register_cvar( "furienhero_version", VERSION, FCVAR_SERVER|FCVAR_SPONLY )
}
public logoevent_Round_Start()
{
new iPlayers[32], iNum
get_players(iPlayers, iNum, "c")
new iRandomSavior = iPlayers[ random_num( 0, iNum -1 ) ]
if ( is_user_alive( iRandomSavior ) && cs_get_user_team( iRandomSavior ) == CS_TEAM_CT )
set_task( float( get_pcvar_num( cvar_hero_time ) ), "TASK_RandomSavior", iRandomSavior )
}
public fw_PlayerSpawn_Post( id )
{
if ( !is_user_alive( id ) || cs_get_user_team( id ) != CS_TEAM_CT )
return;
strip_user_weapons( id )
give_item( id, "weapon_knife" )
cs_reset_user_model( id )
set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0 )
}
public TASK_RandomSavior( id )
{
new szName[ 32 ], rgbcolor[ 16 ], red[ 16 ], green[ 16 ], blue[ 16 ]
get_user_name( id, szName, charsmax( szName ) )
get_pcvar_string( cvar_hero_glow, rgbcolor, charsmax( rgbcolor ) )
parse( rgbcolor, red, charsmax( red ), green, charsmax( green ), blue, charsmax( blue ) )
give_item( id, "weapon_hegrenade" )
give_item( id, "weapon_flashbang" )
give_item( id, "weapon_flashbang" )
give_item( id, "weapon_smokegrenade" )
give_weapon_janus1( id )
give_weapon_janus7( id )
set_user_health( id, get_pcvar_num( cvar_hero_health ) )
set_user_armor( id, get_pcvar_num( cvar_hero_armor ) )
cs_set_user_model( id, g_szHeroModel )
set_dhudmessage( random( 256 ), random( 256 ), random( 256 ), 0.01, 0.40, 0, 6.0, 5.0 )
show_dhudmessage( id, "%s is Hero", szName )
set_user_rendering( id, kRenderFxGlowShell, str_to_num( red ), str_to_num( green ), str_to_num( blue ), kRenderNormal, 25 )
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/