Суть плагина - игрок танцует и играет музыка в конце раунда.
Код:
#include amxmodx
#include fakemeta
#define PL_NAME "CSO Round End"
#define PL_VERSION "0.0.1"
#define PL_AUTHOR "Dias Pendragon & Freedo.m & OverGame"
new g_MaxPlayers, source[][] = {
"models/v_round_end.mdl",
"round_end/end_sound.mp3"
};
public plugin_precache() {
engfunc( EngFunc_PrecacheModel, source[ 0 ] );
engfunc( EngFunc_PrecacheSound, source[ 1 ] );
}
public plugin_init() {
register_plugin( PL_NAME, PL_VERSION, PL_AUTHOR );
register_logevent( "Event_RoundEnd", 2, "1=Round_End" );
g_MaxPlayers = get_maxplayers();
}
public Event_RoundEnd() {
for( new client = 1; client <= g_MaxPlayers; client++ ) {
if( !is_user_connected( client ) ) continue;
client_cmd( client, "stop; mp3 play sound/%s", source[ 1 ] );
if( !is_user_alive( client ) ) continue;
static iszViewModel = 0;
if( iszViewModel || (iszViewModel = engfunc( EngFunc_AllocString, source[ 0 ] )) )
set_pev_string( client, pev_viewmodel2, iszViewModel );
set_pdata_float( client, 83, 5.0 );
UTIL_WeaponAnimation( client, 0 );
}
}
stock UTIL_WeaponAnimation( client, anim ) {
set_pev( client, pev_weaponanim, anim );
engfunc( EngFunc_MessageBegin, MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, {0.0, 0.0, 0.0}, client );
write_byte( anim );
write_byte( 0 );
message_end();
}
ссылка для скачивания моделей
http://www.fayloobmennik.net/6129377
Подскажите, например я не хочу чтобы играла музыка в конце, как исправить код?
Отредактировал: iShot, - 28.4.2016, 8:13
Причина: Выдано устное предупреждение!