Counter-Strike 1.6
VIP
Cs-PlovdiV.com - Aim Attack
93.123.16.4:27022
aim_map2
Играчи: 4/16
aim_map2
Counter-Strike 1.6
VIP
93.123.16.4:27022 Cs-PlovdiV.com - Aim Attack aim_map2 4/16

Modify Autorestart after first round

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Modify Autorestart after first round

Мнение от Niiicu » 07 Май 2020, 13:04

Hello,
If someone can help me with this plugin.
I would like the screen turns red when the round restarts.
Something like plugin OciXCrom's Rank System [XP | Levels | Ranks] when you increase a level the screen turns to green for few seconds.
Also, i would like to have this plugin colored and i will change the messeges on the chat.
Thank you,

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

#include < amxmodx >
#include < amxmisc >

#define MAX_COUNT 	1

new g_Count;

public plugin_init ( ) 
{
	register_plugin( "AUTO RESTART", "1.0", "daNzEt" )
	
	register_event( "TextMsg", "event_gamecomencing", "a", "2&#Game_C" )
	register_event( "HLTV", "event_newround", "a", "1=0","2=0" )
	
	state START_FUNCTION
	
	return PLUGIN_CONTINUE;
}	
	
public event_gamecomencing()
{
	g_Count = 0
}

public event_newround() < BLOCK_FUNCTION > { }

public event_newround() < START_FUNCTION >
{
	if( g_Count++ == MAX_COUNT )
	{
		server_cmd( "sv_restart 2" )

		set_task( 3.0, "show_messages" )
		
		state BLOCK_FUNCTION
	}
}

public show_messages()
{
	client_print(0, print_chat, "============= LIVE =============")
	client_print(0, print_chat, "============= LIVE =============")
	client_print(0, print_chat, "============= LIVE =============")
	client_print(0, print_chat, "============= LIVE =============")
	client_print(0, print_chat, "============= LIVE =============")
	client_print(0, print_chat, "============= LIVE =============")
	client_print(0, print_chat, "============= LIVE =============")
}
CS.AVENGERSCS.RO - Classic

Аватар
Tornado_SW
Извън линия
AMXX Скриптър
AMXX Скриптър
Мнения: 161
Регистриран на: 04 Фев 2020, 22:41
Се отблагодари: 28 пъти
Получена благодарност: 83 пъти
Обратна връзка:

Modify Autorestart after first round

Мнение от Tornado_SW » 07 Май 2020, 13:44

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

#include < amxmodx >
#include < amxmisc >
#include <cromchat>

#define MAX_COUNT 	1

new g_Count, g_iScreenFade, cvar_message;

public plugin_init ( ) 
{
	register_plugin( "AUTO RESTART", "1.0", "daNzEt" )
	
	register_event( "TextMsg", "event_gamecomencing", "a", "2&#Game_C" )
	register_event( "HLTV", "event_newround", "a", "1=0","2=0" )
	
	g_iScreenFade = get_user_msgid("ScreenFade")
	cvar_message = register_cvar("ar_message", "&x03============= &x04LIVE &x03=============")
	
	state START_FUNCTION
	
	return PLUGIN_CONTINUE;
}	
	
public event_gamecomencing()
{
	g_Count = 0
	
	new iPlayers[32], iPNum
	get_players(iPlayers, iPNum)
	
	for(new i; i < iPNum; i++)
	{
		message_begin(MSG_ONE, g_iScreenFade, {0, 0, 0}, iPlayers[i])
		write_short(5<<12)
		write_short(5<<12)
		write_short(0x0000)
		write_byte(255)
		write_byte(0)
		write_byte(0)
		write_byte(255)
		message_end()
	}
}

public event_newround() < BLOCK_FUNCTION > { }

public event_newround() < START_FUNCTION >
{
	if( g_Count++ == MAX_COUNT )
	{
		server_cmd( "sv_restart 2" )
		set_task( 3.0, "show_messages" )
		
		state BLOCK_FUNCTION
	}
}

public show_messages()
{
	new i
	while(i < 7)
	{
		new szMessage[256]
		get_pcvar_string(cvar_message, szMessage, charsmax(szMessage))
		CromChat(0, "&x00%s", szMessage)
		i++
	}
}
Cvar: ar_message "&x03============= &x04LIVE &x03============="

Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Modify Autorestart after first round

Мнение от Niiicu » 07 Май 2020, 14:00

Thank you,
Can i add more messeges?

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

Cvar: ar_message "&x03============= &x04LIVE &x03============="
CS.AVENGERSCS.RO - Classic

Аватар
Tornado_SW
Извън линия
AMXX Скриптър
AMXX Скриптър
Мнения: 161
Регистриран на: 04 Фев 2020, 22:41
Се отблагодари: 28 пъти
Получена благодарност: 83 пъти
Обратна връзка:

Modify Autorestart after first round

Мнение от Tornado_SW » 07 Май 2020, 14:05

Look at the bottom of the code.

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

while(i < 7)
7 is the number of the messages.

Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Modify Autorestart after first round

Мнение от Niiicu » 07 Май 2020, 16:37

The plugin is not working, i can only see the restart messeges but not that screen fade color. Check this photo -https://imgur.com/gallery/FI7X82V
And also i would like to add more messages, for exemple:
**************** LIVE ************************************
************** NAME OF THE SERVER *****************
************** ENJOY ***********************************
CS.AVENGERSCS.RO - Classic

Аватар
Tornado_SW
Извън линия
AMXX Скриптър
AMXX Скриптър
Мнения: 161
Регистриран на: 04 Фев 2020, 22:41
Се отблагодари: 28 пъти
Получена благодарност: 83 пъти
Обратна връзка:

Modify Autorestart after first round

Мнение от Tornado_SW » 07 Май 2020, 17:28

I have a weird bug and when I update the plugin, it brings me back to the first version (yes I replaced the old one, even changed the plugin's name). So I couldn't test but I hope it works fine.

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

#include < amxmodx >
#include < amxmisc >
#include <cromchat>

#define MAX_COUNT 	1

new g_Count, g_iScreenFade, cvar_message1, cvar_message2, cvar_message3;

public plugin_init ( ) 
{
	register_plugin( "AUTO RESTART", "1.0", "daNzEt" )
	
	register_event( "TextMsg", "event_gamecomencing", "a", "2&#Game_C" )
	register_event( "HLTV", "event_newround", "a", "1=0","2=0" )
	
	g_iScreenFade = get_user_msgid("ScreenFade")
	
	new szHostName[2][32]
	get_pcvar_string(get_cvar_pointer("hostname"), szHostName[0], charsmax(szHostName[]))
	formatex(szHostName[1], charsmax(szHostName[]), "&x03============= &x04%s &x03=============", szHostName[0])
	
	cvar_message1 = register_cvar("ar_message", "&x03============= &x04LIVE &x03=============")
	cvar_message2 = register_cvar("ar_message", szHostName[1])
	cvar_message3 = register_cvar("ar_message", "&x03============= &x04ENJOY &x03=============")
		
	state START_FUNCTION
	
	return PLUGIN_CONTINUE;
}	
	
public event_gamecomencing()
{
	g_Count = 0
}

public event_newround() < BLOCK_FUNCTION > { }

public event_newround() < START_FUNCTION >
{
	if( g_Count++ == MAX_COUNT )
	{
		server_cmd( "sv_restart 2" )
		set_task( 3.0, "show_messages" )
	
		new iPlayers[32], iPNum
		get_players(iPlayers, iPNum)
		
		for(new i; i < iPNum; i++)
		{
			message_begin(MSG_ONE, g_iScreenFade, {0, 0, 0}, iPlayers[i])
			write_short(5<<12)
			write_short(5<<12)
			write_short(0x0000)
			write_byte(255)
			write_byte(0)
			write_byte(0)
			write_byte(255)
			message_end()
		}
		
		state BLOCK_FUNCTION
	}
}

public show_messages()
{
	new i
	while(i < 3)
	{
		new szMessage[3][256]
		get_pcvar_string(cvar_message1, szMessage[0], charsmax(szMessage[]))
		get_pcvar_string(cvar_message2, szMessage[1], charsmax(szMessage[]))
		get_pcvar_string(cvar_message3, szMessage[2], charsmax(szMessage[]))
		
		CromChat(0, "&x00%s", szMessage[0])
		CromChat(0, "&x00%s", szMessage[1])
		CromChat(0, "&x00%s", szMessage[2])
		i++
	}
}

Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Modify Autorestart after first round

Мнение от Niiicu » 07 Май 2020, 18:48

It's the same for me. When i update the plugin on the server, it bring me to the old version, i even changed the plugin name, but the same. It's strange, i don't knoe how to fix it :)
CS.AVENGERSCS.RO - Classic

Аватар
Niiicu
Извън линия
Потребител
Потребител
Мнения: 88
Регистриран на: 24 Апр 2020, 10:01
Се отблагодари: 1 път
Получена благодарност: 1 път

Modify Autorestart after first round

Мнение от Niiicu » 08 Май 2020, 13:02

I still didn't solved the problem with this plugin. It's very strange
Can anyone help me?
CS.AVENGERSCS.RO - Classic

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

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

Кой е на линия

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