Request Welcome on the server plugin

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

Request Welcome on the server plugin

Мнение от Niiicu » 01 Юни 2020, 09:23

Hi,
If someone can make this plugin for me
When a player connects on the server, I want a message to appear after few seconds.

Message form with red color centered to the left middle of the screen with glowing effects

FREE VIP between x and y
Your rank is x from y
Last visit DATE(today)

Thank you
CS.AVENGERSCS.RO - Classic

Аватар
illusion
На линия
Developer
Developer
Мнения: 1810
Регистриран на: 27 Ное 2016, 17:47
Местоположение: CraftVision
Се отблагодари: 151 пъти
Получена благодарност: 370 пъти
Обратна връзка:

Request Welcome on the server plugin

Мнение от illusion » 01 Юни 2020, 11:14

I didn't test it.

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

#include <amxmodx>
#include <csstats>

#define AUTHOR "Safety Condemn / summertime vibes"

public plugin_init()
{
  register_plugin("Welcome HUD", "1.0а-AMXXBG", AUTHOR)
}

public client_connect(id) {
   set_task(15.0, "WelcomeHudMessage", id) //After how many seconds to be showed
}

public WelcomeHudMessage(id)
{
  static iMax_pos;

  iMax_pos = get_statsnum();

  new Stats[8];
  new iRank = get_user_stats(id, Stats, Stats);
  num_to_str(iRank, Stats, charsmax(Stats));

  set_hudmessage( 255, 0, 0, 0.02, -1.00, 1, 0.1, 20.0, 0.1, 0.1, -1 )
  show_hudmessage(id, "FREE VIP between x and y^nYour rank is %d from %d^nLast visit DATE(today)", Stats, iMax_pos)
}

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Request Welcome on the server plugin

Мнение от Infamous2018 » 01 Юни 2020, 11:35

Plugin is working i like it but it showing only for 1-2 seconds and then its lost. :D i think an cvar for how long displaying it would be good.

Аватар
illusion
На линия
Developer
Developer
Мнения: 1810
Регистриран на: 27 Ное 2016, 17:47
Местоположение: CraftVision
Се отблагодари: 151 пъти
Получена благодарност: 370 пъти
Обратна връзка:

Request Welcome on the server plugin

Мнение от illusion » 01 Юни 2020, 11:41

If u have more HUD Messages, just remove them because you reach max limit of channels. If u don't want to remove them, I will make it with dhudmessage and it will work without a problem.

Аватар
Infamous2018
Извън линия
Foreigner
Foreigner
Мнения: 522
Регистриран на: 08 Апр 2018, 16:56
Се отблагодари: 14 пъти
Получена благодарност: 21 пъти

Request Welcome on the server plugin

Мнение от Infamous2018 » 01 Юни 2020, 11:49

OK then it could be gunxpmod permahud. :D But for me you could it for dhud. I am not the request thread User but i would use it when u would do it for me :D

Аватар
illusion
На линия
Developer
Developer
Мнения: 1810
Регистриран на: 27 Ное 2016, 17:47
Местоположение: CraftVision
Се отблагодари: 151 пъти
Получена благодарност: 370 пъти
Обратна връзка:

Request Welcome on the server plugin

Мнение от illusion » 01 Юни 2020, 12:37

With dhud:

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

#include <amxmodx>
#include <csstats>

#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

#define AUTHOR "Safety Condemn / summertime vibes"

public plugin_init()
{
  register_plugin("Welcome HUD", "1.0а-AMXXBG", AUTHOR)
}

public client_connect(id) {
   set_task(15.0, "WelcomeHudMessage", id) //After how many seconds to be showed
}

public WelcomeHudMessage(id)
{
  static iMax_pos;

  iMax_pos = get_statsnum();

  new Stats[8];
  new iRank = get_user_stats(id, Stats, Stats);
  num_to_str(iRank, Stats, charsmax(Stats));

  set_dhudmessage( 255, 0, 0, 0.02, -1.00, 1, 0.1, 20.0, 0.1, 0.1 )
  show_dhudmessage(id, "FREE VIP between x and y^nYour rank is %d from %d^nLast visit DATE(today)", Stats, iMax_pos)
}

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

Re: Request Welcome on the server plugin

Мнение от Niiicu » 01 Юни 2020, 17:16

Thank you, it's working very well :)
CS.AVENGERSCS.RO - Classic

Аватар
illusion
На линия
Developer
Developer
Мнения: 1810
Регистриран на: 27 Ное 2016, 17:47
Местоположение: CraftVision
Се отблагодари: 151 пъти
Получена благодарност: 370 пъти
Обратна връзка:

Request Welcome on the server plugin

Мнение от illusion » 02 Юни 2020, 23:07

For next time if u want to add dhud in other plugin, just make this changes:

Add in start of the plugin this code:

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

#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
Then find set/show_hudmessage and make it set/show_dhudmessage.

Thats all - simple way to do it.

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

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

Кой е на линия

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