#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#if AMXX_VERSION_NUM < 183
#include <dhudmessage>
#endif
new Timer, SecondsCvar
new bool:g_deagle = true
public plugin_init() {
register_plugin( "Deagle WarmUP" , "1.1", "Remake by ill" )
register_event("DeathMsg", "on_death", "a")
register_event( "CurWeapon", "EventCurWeapon", "be", "2!29" )
SecondsCvar = register_cvar("auto_rr_time","60.0")
Timer = get_pcvar_num(SecondsCvar)
set_task(1.0, "start_rr_timer", _, _, _, "a", Timer)
}
public on_death() {
new victim
victim = read_data(2)
if(g_deagle)
set_task(1.0, "fnRevivePlayer", victim)
}
public fnRevivePlayer(id) {
if(!is_user_alive(id))
ExecuteHamB(Ham_CS_RoundRespawn, id)
}
public EventCurWeapon(id){
if(g_deagle)
engclient_cmd(id, "weapon_deagle")
}
public start_rr_timer() {
Timer--
set_dhudmessage(0, 250, 0, -1.0, 0.08, 0, 60.0, 3.0, 0.1, 1.5)
show_dhudmessage(0, "DEAGLE WARM UP!")
set_dhudmessage(0, 250, 0, -1.0, 0.13, 0, 0.01, 0.01)
show_dhudmessage(0, "Restart After: [ %d ]", Timer)
if(Timer < 1)
{
server_cmd("sv_restartround 1")
set_task(3.0, "rr_end")
g_deagle = false
}
}
public rr_end() {
set_dhudmessage( random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.78, 2, 6.0, 3.0, 0.1, 1.5)
show_dhudmessage(0, "WARM UP FINISHED^nGOOD LUCK")
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/