Hud thetime и nextmap code

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
impossible
Извън линия
Потребител
Потребител
Мнения: 488
Регистриран на: 15 Юни 2019, 12:41
Се отблагодари: 23 пъти
Получена благодарност: 47 пъти

Hud thetime и nextmap code

Мнение от impossible » 21 Авг 2019, 01:47

някой ще ми редактира ли този код когато секундите се сменят и надписа да са в различни разцетки и секундите и надписа да са в синхром заедно това е кода и това by flintst0nes http://flintst0nes.de.vu да не го изписва само thetime ,timeleft i nextmap

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

/********************************************************

    Show me the time plugin V1.2

    by flintst0nes http://flintst0nes.de.vu
    for   flintst0nes FUNSERVER   FAST DL
    visit steam CS1.6 @ 85.131.217.14:27025

**********************************************************

    This plugin for AMX Mod X displays the current
    server time, the time remaining on map and
    the next map coming up under the radar.

    Just install the plugin the usual way copying the
    amxx-file to addons/amxmodx/plugins and append
    showmethetime.amxx to your plugins.ini

**********************************************************

    CHANGELOG
    
    V1.25

    - added cutom msg support
    
    V1.2

    - added cvar to disable display
    - added cvars for custom positioning
    - added cvars for custom color

    V1.1

    - added cvar to hide nextmap and timeleft info

    V1.0

    - shows thetime, timeleft and nextmap

**********************************************************

    Cvars:

    amx_smtt_showinfo 0|1 default: 1
    toggles plugin activity (0 = off)

    amx_moreinfo 0|1 default: 1
    toggles timeleft and nextmap info (0 = off)

	amx_smtt_xpos 0.0 to 1.0 (floating point)
	set x position (upper left corner), default: 0.015

	amx_smtt_ypos 0 to 1 (floating point)
	set y position (upper left corner), default: 0.35

	amx_smtt_red 0 to 255 (integer)
	set display color red part, default: 0

	amx_smtt_green 0 to 255 (integer)
	set display color green part, default: 255

	amx_smtt_blue 0 to 255 (integer)
	set display color blue part, default: 0
	
	amx_smtt_custommsg "my custom string"
	displays a custom string, leave empty to disable, max 32 characters

**********************************************************/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
	register_plugin("Show me the time","1.2","flintst0nes.de.vu")
	set_task(1.0,"Tick",0,_,_,"b")
	register_cvar("amx_smtt_showinfo","1",0)
	register_cvar("amx_smtt_moreinfo","1",0)
	register_cvar("amx_smtt_xpos","0.015",0)
	register_cvar("amx_smtt_ypos","0.35",0)
	register_cvar("amx_smtt_red","0",0)
	register_cvar("amx_smtt_green","255",0)
	register_cvar("amx_smtt_blue","0",0)
	register_cvar("amx_smtt_custommsg","flintst0nes.de.vu",0)
}

public Tick(){

    if(!get_cvar_num("amx_smtt_showinfo")){

        return PLUGIN_HANDLED

    }else{

        new players[32],num,i
        get_players(players,num)
        for(i = 0; i <= num; i++)
        {
            new id = players[i]
            new timestring[31]
            new timeleft_minutes
            new timeleft_seconds
            new nextmap[31]
            new message[256]
            new custommessage[31]
			
            if(is_user_connected(id)) {

                get_time("%H:%M:%S",timestring,8)				
				get_cvar_string("amx_smtt_custommsg", custommessage, 31)
				
                if(get_cvar_num("amx_smtt_moreinfo")){

                    timeleft_minutes = get_timeleft()/60
                    timeleft_seconds = get_timeleft()%60

                    get_cvar_string("amx_nextmap",nextmap,31)
                                        
                    if( strcmp(custommessage, "",0) == 0 ){
                    
                    	format(message,255,"Thetime: %s^nTimeleft: %i:%i^nNextmap: %s", timestring, timeleft_minutes, timeleft_seconds, nextmap)
                    	
                    }else{
                    
                    	format(message,255,"%s^nThetime: %s^nTimeleft: %i:%i^nNextmap: %s",custommessage, timestring, timeleft_minutes, timeleft_seconds, nextmap)
                    	
                    }
                }else{
					if( strcmp(custommessage, "",0) == 0 ){
					
                    	format(message,255,"Thetime: %s", timestring)

                    }else{		                  	
                    
                    	format(message,255,"%s^nThetime: %s",custommessage, timestring)
                    	
                    }
                }
                set_hudmessage (get_cvar_num("amx_smtt_red"),get_cvar_num("amx_smtt_green"),get_cvar_num("amx_smtt_blue"), get_cvar_float("amx_smtt_xpos"), get_cvar_float("amx_smtt_ypos"), 0, 6.0, 2.0, 0.1, 0.2, 4 )
                show_hudmessage(id, message)

            }
        }
	}
    return PLUGIN_HANDLED
}
Последно промяна от OciXCrom на 21 Авг 2019, 14:35, променено общо 6 пъти.
Причина: Активирай мозъка.

Аватар
thoughtz
Извън линия
Модератор
Модератор
Мнения: 585
Регистриран на: 13 Окт 2016, 00:32
Местоположение: гр. София
Се отблагодари: 112 пъти
Получена благодарност: 79 пъти
Обратна връзка:

редактиране на код

Мнение от thoughtz » 21 Авг 2019, 02:45

Оправи си заглавието на темата.
Използвай таг-а [ code ]

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

Hud thetime и nextmap code

Мнение от OciXCrom » 21 Авг 2019, 14:39

Категорично зле написан плъгин.

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

/********************************************************

	Show me the time plugin V1.2

	by flintst0nes http://flintst0nes.de.vu
	for   flintst0nes FUNSERVER   FAST DL
	visit steam CS1.6 @ 85.131.217.14:27025

**********************************************************

	This plugin for AMX Mod X displays the current
	server time, the time remaining on map and
	the next map coming up under the radar.

	Just install the plugin the usual way copying the
	amxx-file to addons/amxmodx/plugins and append
	showmethetime.amxx to your plugins.ini

**********************************************************

	CHANGELOG

	V1.25

	- added cutom msg support

	V1.2

	- added cvar to disable display
	- added cvars for custom positioning
	- added cvars for custom color

	V1.1

	- added cvar to hide nextmap and timeleft info

	V1.0

	- shows thetime, timeleft and nextmap

**********************************************************

	Cvars:

	amx_smtt_showinfo 0|1 default: 1
	toggles plugin activity (0 = off)

	amx_moreinfo 0|1 default: 1
	toggles timeleft and nextmap info (0 = off)

	amx_smtt_xpos 0.0 to 1.0 (floating point)
	set x position (upper left corner), default: 0.015

	amx_smtt_ypos 0 to 1 (floating point)
	set y position (upper left corner), default: 0.35

	amx_smtt_red 0 to 255 (integer)
	set display color red part, default: 0

	amx_smtt_green 0 to 255 (integer)
	set display color green part, default: 255

	amx_smtt_blue 0 to 255 (integer)
	set display color blue part, default: 0

	amx_smtt_custommsg "my custom string"
	displays a custom string, leave empty to disable, max 32 characters

**********************************************************/

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
	register_plugin("Show me the time","1.2","flintst0nes.de.vu")
	set_task(1.0,"Tick",0,_,_,"b")
	register_cvar("amx_smtt_showinfo","1",0)
	register_cvar("amx_smtt_moreinfo","1",0)
	register_cvar("amx_smtt_xpos","0.015",0)
	register_cvar("amx_smtt_ypos","0.35",0)
	register_cvar("amx_smtt_custommsg","flintst0nes.de.vu",0)
}

public Tick(){

	if(!get_cvar_num("amx_smtt_showinfo")){

		return PLUGIN_HANDLED

	}else{

		new players[32],num,i
		get_players(players,num)
		for(i = 0; i <= num; i++)
		{
			new id = players[i]
			new timestring[31]
			new timeleft_minutes
			new timeleft_seconds
			new nextmap[31]
			new message[256]
			new custommessage[31]

			if(is_user_connected(id)) {

				get_time("%H:%M:%S",timestring,8)
				get_cvar_string("amx_smtt_custommsg", custommessage, 31)

				if(get_cvar_num("amx_smtt_moreinfo")){

					timeleft_minutes = get_timeleft()/60
					timeleft_seconds = get_timeleft()%60

					get_cvar_string("amx_nextmap",nextmap,31)

					if( strcmp(custommessage, "",0) == 0 ){

						format(message,255,"Thetime: %s^nTimeleft: %i:%i^nNextmap: %s", timestring, timeleft_minutes, timeleft_seconds, nextmap)

					}else{

						format(message,255,"%s^nThetime: %s^nTimeleft: %i:%i^nNextmap: %s",custommessage, timestring, timeleft_minutes, timeleft_seconds, nextmap)

					}
				}else{
					if( strcmp(custommessage, "",0) == 0 ){

						format(message,255,"Thetime: %s", timestring)

					}else{

						format(message,255,"%s^nThetime: %s",custommessage, timestring)

					}
				}
				set_hudmessage (random(256), random(256), random(256), get_cvar_float("amx_smtt_xpos"), get_cvar_float("amx_smtt_ypos"), 0, 6.0, 2.0, 0.1, 0.2, 4 )
				show_hudmessage(id, message)

			}
		}
	}
	return PLUGIN_HANDLED
}
това by flintst0nes http://flintst0nes.de.vu да не го изписва
cvar amx_smtt_custommsg

Аватар
impossible
Извън линия
Потребител
Потребител
Мнения: 488
Регистриран на: 15 Юни 2019, 12:41
Се отблагодари: 23 пъти
Получена благодарност: 47 пъти

Hud thetime и nextmap code

Мнение от impossible » 21 Авг 2019, 17:51

Браво добре стана 😎

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

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

Кой е на линия

Потребители разглеждащи този форум: Google [Bot] и 23 госта