Plugin dhudmessage

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
vini2001
Извън линия
Foreigner
Foreigner
Мнения: 45
Регистриран на: 09 Мар 2020, 15:50
Се отблагодари: 4 пъти
Обратна връзка:

Plugin dhudmessage

Мнение от vini2001 » 31 Май 2020, 06:31

Hello, I would like to request a dhud message plug-in in which the plug-in will do the following

a dhud message that appears only in the first round of the player only after he is alive, if he enters the middle of the round and is watching the message does not appear, only after he is reborn, every time he connects, in the other rounds, no appears more ...

must be in a centralized format and in a very slow typewriter format for everyone to see

"Hello guys blz? Welcome to the server .... Invite the team ... the (VIP) is free ... don't forget to add the ip !!!

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

Plugin dhudmessage

Мнение от atmax » 31 Май 2020, 11:39

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

#include <amxmodx>
#include <hamsandwich>
#if AMXX_VERSION_NUM < 183
    #include <dhudmessage>
#endif

new Float:FX_TIME = 10.0;
new g_iSeen;
new Float:HOLD_TIME = 10.0;
new const szMessage[] = "Hello guys blz? Welcome to the server^n Invite the team^n the (VIP) is free^n don't forget to add the ip !!!";
new Float:MsgApear_Time = 0.4;
new Float:MsgDisapear_Time = 0.5;

public plugin_init()
{
	register_plugin("Dhud OnFirstRound", "1.0", "aTmAx")
	RegisterHam(Ham_Spawn,"player","OnPlayerSpawn", 1)
	register_logevent("OnFirstRound", 2, "0=World triggered", "1&Restart_Round_")
	register_logevent("OnFirstRound", 2, "0=World triggered", "1=Game_Commencing")
	register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start")
}

public OnFirstRound()
{
	g_iSeen = 0
}

public OnRoundStart()
{
	g_iSeen++
}

public OnPlayerSpawn(id)
{	
	if(is_user_alive(id) && g_iSeen < 1)
	{
		set_dhudmessage(0, 255, 0, -1.0, -1.0, 2, FX_TIME, HOLD_TIME, MsgApear_Time, MsgDisapear_Time)
		show_dhudmessage(id, szMessage)
	}
}
new Float:FX_TIME = 10.0; - Duration of the effect
new Float:HOLD_TIME = 10.0; - Message hold time

From this line you can eddit the message:
new const szMessage[] = "Hello guys blz? Welcome to the server^n Invite the team^n the (VIP) is free^n don't forget to add the ip !!!";

new Float:MsgApear_Time = 0.4; - Message apear time
new Float:MsgDisapear_Time = 0.5; - Message dissapear time

Note: Time is in seconds
Rest in peace my friend I always will remember you! 🖤👊

Аватар
vini2001
Извън линия
Foreigner
Foreigner
Мнения: 45
Регистриран на: 09 Мар 2020, 15:50
Се отблагодари: 4 пъти
Обратна връзка:

Plugin dhudmessage

Мнение от vini2001 » 31 Май 2020, 17:00

I don't know why, but the message doesn't appear

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

Plugin dhudmessage

Мнение от OciXCrom » 31 Май 2020, 17:16

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

#include <amxmodx>
#include <hamsandwich>

#if AMXX_VERSION_NUM < 183 || !defined set_dhudmessage
	#tryinclude <dhudmessage>

	#if !defined _dhudmessage_included
		#error "dhudmessage.inc" is missing in your "scripting/include" folder. Download it from: "https://amxx-bg.info/forum/inc/"
	#endif
#endif

#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32
#endif

#define MESSAGE_COLOR 0, 255, 0
#define MESSAGE_POSITION -1.0, -1.0
#define MESSAGE_DURATION 10.0
#define MESSAGE_EFFECTS 2
#define MESSAGE_TEXT "Hello guys blz? Welcome to the server .... Invite the team ... the (VIP) is free ... don't forget to add the ip !!!"

new bool:g_bSeen[MAX_PLAYERS + 1]

public plugin_init()
{
	register_plugin("DHUD Message on First Spawn", "1.0", "OciXCrom")
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
}

public client_putinserver(id)
{
	g_bSeen[id] = false
}

public OnPlayerSpawn(id)
{
	if(!g_bSeen[id] && is_user_alive(id))
	{
		g_bSeen[id] = true
		set_dhudmessage(MESSAGE_COLOR, MESSAGE_POSITION, .effects = MESSAGE_EFFECTS, .holdtime = MESSAGE_DURATION)
		show_dhudmessage(id, MESSAGE_TEXT)
	}
}

Аватар
vini2001
Извън линия
Foreigner
Foreigner
Мнения: 45
Регистриран на: 09 Мар 2020, 15:50
Се отблагодари: 4 пъти
Обратна връзка:

Plugin dhudmessage

Мнение от vini2001 » 07 Сеп 2020, 07:10

I've been using this plugin for a few months, but for a while it has been failing, where it stops showing the message in the middle of the first line ... is there any correction? I do not want to have to disable any other plugin I like it a lot and everyone

Аватар
atmax
Извън линия
Потребител
Потребител
Мнения: 492
Регистриран на: 22 Мар 2018, 15:06
Се отблагодари: 37 пъти
Получена благодарност: 43 пъти

Plugin dhudmessage

Мнение от atmax » 07 Сеп 2020, 10:17

Did you made any changes? If so, then show us your sma code.
Rest in peace my friend I always will remember you! 🖤👊

Аватар
vini2001
Извън линия
Foreigner
Foreigner
Мнения: 45
Регистриран на: 09 Мар 2020, 15:50
Се отблагодари: 4 пъти
Обратна връзка:

Plugin dhudmessage

Мнение от vini2001 » 07 Сеп 2020, 15:36

I didn’t change anything he just typed the machine in the middle of the sentence

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

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

Кой е на линия

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