pokemon GO
Пользователь
- Регистрация
- 9 Июл 2017
- Сообщения
- 126
- Симпатии
- 20
- Пол
- Мужской
Добрый день.
Прошу помочь знающих людей добавить музыку в плагин разминки.
Прошу помочь знающих людей добавить музыку в плагин разминки.
Код:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <dhudmessage>
#include <cstrike>
#define KNIFE 1
#define GRAVITY 1
new timer, cvar_wapmup_time, cvar_hp;
new bool:g_warmup
new g_msg_CurWeapon
public plugin_init()
{
register_plugin( "Auto Restart KNIFE" , "2.0", "Leo_[BH]" );
register_dictionary("auto_rr.txt");
cvar_wapmup_time = register_cvar("auto_rr_time","60.0")
cvar_hp = register_cvar("auto_rr_hp","50")
#if defined KNIFE
register_event("CurWeapon","checkWeapon","be","1=1")
#endif
RegisterHam(Ham_Spawn, "player", "Spawn_Me", 1)
RegisterHam(Ham_Killed, "player", "Killed_Me", 1)
timer = floatround(get_pcvar_float(cvar_wapmup_time))
set_task(1.0, "start_rr_timer", _, _, _, "a", floatround(get_pcvar_float(cvar_wapmup_time)))
g_msg_CurWeapon = get_user_msgid("CurWeapon")
g_warmup = true
}
public start_rr_timer()
{
set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.08, 0, 0.0, 0.01)
show_dhudmessage(0, "%L", LANG_PLAYER, "RR_TIME" , timer)
#if defined GRAVITY
server_cmd("sv_gravity 400")
#endif
if(timer == 1)
{
#if defined GRAVITY
server_cmd("sv_gravity 800")
#endif
server_cmd("sv_restartround 1")
set_task(3.0, "pistol_rr")
g_warmup = false
}
timer--
}
public pistol_rr()
{
server_cmd("sv_restartround 1")
set_task(3.0, "rr_end")
}
public rr_end()
{
set_dhudmessage( 0, 128, 0, -1.0, 0.78, 2, 6.0, 3.0, 0.1, 1.5, false )
show_dhudmessage(0, "%L", LANG_PLAYER, "RR_GG")
}
// // // // // // // // // // // // // // //
public Spawn_Me(id)
{
if(!g_warmup || !is_user_alive(id))
return PLUGIN_CONTINUE
#if defined KNIFE
checkWeapon(id)
cs_set_user_money(id, 0)
#endif
set_user_health(id, get_pcvar_num(cvar_hp));
return PLUGIN_CONTINUE
}
public Killed_Me(id)
{
if(g_warmup)
{
if(get_user_flags(id) & ADMIN_BAN)
{
set_task(2.5, "respawn", id)
}
else
{
set_task(5.0, "respawn", id)
}
}
}
public respawn(id)
{
if(!g_warmup || !is_user_connected(id))
return PLUGIN_CONTINUE
new CsTeams:my_team;
my_team = cs_get_user_team(id);
if ((my_team == CS_TEAM_T) || (my_team == CS_TEAM_CT))
{
ExecuteHamB(Ham_CS_RoundRespawn, id)
}
return PLUGIN_CONTINUE
}
#if defined KNIFE
public checkWeapon(id)
{
if(!g_warmup || !is_user_alive(id))
return PLUGIN_CONTINUE
new weaponType = read_data(2)
if (weaponType == CSW_KNIFE)
return PLUGIN_CONTINUE
CmdKnife(id)
return PLUGIN_CONTINUE
}
public CmdKnife(id)
{
engclient_cmd(id, "weapon_knife")
message_begin(MSG_ONE_UNRELIABLE, g_msg_CurWeapon, {0,0,0}, id)
write_byte(1)
write_byte(CSW_KNIFE)
write_byte(0)
message_end()
}
#endif