Knife WarmUp

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Knife WarmUp

Мнение от lantimilan » 24 Фев 2019, 16:37

Hello who can help me to creat one plugin for warmup just knife to show in hud 70 second with different color in warmup and all players to have just 50HP and if it possible to tell in HUD when is LIVE ?

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#include <hamsandwich>
#include <fun>

new Timer, SecondsCvar
new bool:g_knife = true

public plugin_init()
{
    register_plugin( "WarmUP" , "1.0", "ExTrEaM" )
	
    register_event("DeathMsg", "on_death", "a")
    register_event( "CurWeapon", "EventCurWeapon", "be", "2!29" )
	RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);
	SecondsCvar = register_cvar("auto_rr_time","40");

    Timer = get_pcvar_num(SecondsCvar)
    set_task(1.0, "start_rr_timer", _, _, _, "a", Timer)
}

public plugin_precache()
{
	precache_sound("misc/c0d3.mp3")
}

public fw_PlayerSpawn_Post(id)
{
	if(!is_user_alive(id))
        return
		
	if(g_knife)
		set_user_health(id, 35)
}

public on_death()
{
	new victim
	victim = read_data(2)
	
	if(g_knife)
		set_task(1.0, "fnRevivePlayer", victim)
}

public client_putinserver(id)
{
	if(g_knife)
		set_task(3.0, "Start_sound", id)
}

public Start_sound(id)
{
	if(g_knife)
	{
		client_cmd(id, "mp3 play sound/misc/c0d3.mp3")
		if(!is_user_alive(id) && (get_user_team(id) == 1 || get_user_team(id) == 2) ) 
			ExecuteHamB(Ham_CS_RoundRespawn, id)
	}
}

public fnRevivePlayer(id) 
{
	if(!is_user_alive(id)) 
		ExecuteHamB(Ham_CS_RoundRespawn, id)
}

public EventCurWeapon(id)
{
	if(g_knife) 
		engclient_cmd(id, "weapon_knife")
}

public start_rr_timer()
{
    Timer--
    
    set_dhudmessage(135, 206, 235, -1.0, 0.08, 0, 0.0, 0.01)
    show_dhudmessage(0, "NXEMJE !^nRestart per %d sekonda", Timer)

    if(Timer < 1)
    {
		server_cmd("sv_restartround 1")
		set_task(3.0, "rr_end")
		client_cmd(0, "mp3 stop");
		g_knife = 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, false )
    show_dhudmessage(0, "Suksese ne loje!")
}

Аватар
lantimilan
Извън линия
Foreigner
Foreigner
Мнения: 424
Регистриран на: 29 Ное 2017, 22:49
Се отблагодари: 31 пъти
Получена благодарност: 3 пъти

Knife WarmUp

Мнение от lantimilan » 26 Фев 2019, 11:53

Close Thread

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 45 госта