Заявка за направа на Плъгин - Last Visited

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Заключена
Потребителски аватар

Автор на темата
Darkness*
Потребител
Потребител
Мнения: 28
Регистриран: 07 фев 2019, 00:10
Се отблагодари: 1 път
Получена благодарност: 1 път

Заявка за направа на Плъгин - Last Visited

Мнение от Darkness* » 07 фев 2019, 00:12

Здравейте на всички. :) можете ли да направите един Плъгин плъгина е следния: когато играч влезне в сървъра да изписва така: Zdravei Darkness* ti za posledno si vlizal 7.2.2019 ti si minal mapa za 5.23 Sekundi пример ви давам плъгина е за SpeedRun :)
Последна промяна от Darkness* на 07 фев 2019, 11:06, променено общо 2 пъти.

Потребителски аватар

Fatall LTD
Рекламатор
Рекламатор
Мнения: 116
Регистриран: 30 авг 2018, 09:35
Местоположение: София
Се отблагодари: 14 пъти
Получена благодарност: 3 пъти
Години: 23
Контакти:

Заявка за направа на Плъгин

Мнение от Fatall LTD » 07 фев 2019, 00:23

Погледни това
Oпиcaниe: Зaпoмня пocлeднoтo пoceщeниe нa игpaчa.

Ocoбeнocти:
- Πoздpaвитeлни cъoбщeния
- Πoздpaвитeлни звyци
- Зaпaзвa ĸoнфигypaциятa в в фaйлa nvаult

СVАR-ѕ:
аmх_lv_mеѕѕаgеѕ - Оn(1)/Оff(0) - Πoздpaв.
аmх_lv_ѕоundѕ - Оn(1)/Оff(0) - Πoздpaв cъc звyĸ.

Cнимĸa:
1297700925_tdxd6ja2.jpg
1297700925_tdxd6ja2.jpg (8.39 KиБ) Видяна 272 пъти
1297700925_tdxd6ja2.jpg
1297700925_tdxd6ja2.jpg (8.39 KиБ) Видяна 272 пъти

Код: Избери всички

/* Plugin generated by AMXX-Studio */

/*
AMX Mod X Plugin

Last Visited by GordonFreeman

Plugin made:
- Remembers the last time a player visits the server

Features:
- Greet messages
- Greet sounds
- Store configuration in nvault file

Type in chat:
/lastvisited or /lv for last visited info :)


I REAL LIKE nVault system!!!
*/
//-----------------------------------------------------------------------
#include <amxmodx>
#include <nvault>
//-----------------------------------------------------------------------
#define PLUGIN "Last Visited"
#define VERSION "1.1"
#define AUTHOR "GordonFreeman"
//-----------------------------------------------------------------------
new vault
new const tag[]="[LV]"
new chour[6],cmin[6],cday[6],cm[6],cyear[6],ctime[32] //  TIME IS NOW
new bool:g_messages[33],bool:g_sounds[33] // Cvars :)
//-----------------------------------------------------------------------
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	// Client commands
	register_clcmd("say /lastvisited","say_lastvisited")
	register_clcmd("say /lv","say_lastvisited")
	// Server commands
	register_srvcmd("amx_lv_messages","set_messages") // messages cvar
	register_srvcmd("amx_lv_sounds","set_sounds") // sounds cvar
	
	vault=nvault_open("last_visited") // the vault
	
	set_time() // Set current time
}
//-----------------------------------------------------------------------
public plugin_end(){
	nvault_close(vault)
}
//-----------------------------------------------------------------------
public plugin_cfg(){
	// Get plugin configuration
	new messages_status=nvault_get(vault,"set_messages")
	new sounds_status=nvault_get(vault,"set_sounds")
	
	// Set greet messages status
	if(messages_status==0){
		g_messages[32]=false
	}else{
		g_messages[32]=true
	}
	
	// Set greet sounds status
	if(sounds_status==0){
		g_sounds[32]=false
	}else{
		g_sounds[32]=true
	}
}
//-----------------------------------------------------------------------
public set_time(){
	get_time("%H",chour,5) 	// Hours
	get_time("%M",cmin,5) 	// Minutes
	get_time("%d",cday,5)	// Day
	get_time("%m",cm,5)	// Mounth
	get_time("%Y",cyear,5)	// Year
	get_time("%H:%M:%S - %m/%d/%Y",ctime,31) // the time
}
//-----------------------------------------------------------------------
public client_putinserver(id){
	set_time()
	set_task(5.0,"check_data",id) // it's begining :)
}
//-----------------------------------------------------------------------
public check_data(id){
	set_time()
	new user[32],nick[31],value[64]
	new shour[6],smin[6],sday[6],sm[6],syear[6] // stored time
	
	get_user_authid(id,user,31)
	get_user_name(id,nick,31)
	
	// Get stored time
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	if(g_messages[32]==true)greet_messages(id)
	if(g_sounds[32]==true)greet_sounds(id)
	
	if(nvault_get(vault,user)==0){
		client_print(id,print_chat,"%s You have not played here",tag)
	}else{
		client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
	}
	
	save_data(id)
}
//------------------------------------------------------------------------------	
public greet_messages(id){
	new user[32],hostname[64]
	
	new hrs=str_to_num(chour)
	
	get_user_name(id,user,31)
	
	get_cvar_string("hostname",hostname,63)
	
	set_time()
	
	if(hrs<12){
		client_print(id,print_chat,"%s Good Morning %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=16){
		client_print(id,print_chat,"%s Good Afternoon %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=23){
		client_print(id,print_chat,"%s Good Evening %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=03){
		client_print(id,print_chat,"%s Good Night %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else{
		client_print(id,print_chat,"%s Hello %s! Welocme to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}
}
//-------------------------------------------------------------------------------
public greet_sounds(id){
	new hrs=str_to_num(chour)
	
	new morningsounds[2][]={
		"scientist/c1a0_sci_gm(e55)",
		"scientist/c1a0_sci_gm1(e60)"
	}
	new afternoonsounds[5][]={
		"scientist/goodtoseeyou",
		"scientist/greetings",
		"scientist/greetings2",
		"scientist/hellofreeman(e35)",
		"scientist/hellothere"
	}
	new evningsounds[3][]={
		"scientist/hellothere",
		"scientist/greetings",
		"scientist/c1a0_sci_itsyou"
	}
	if(hrs<=12){
		client_cmd(id,"spk %s",morningsounds[random_num(0,1)])
	}else if(hrs<=16){
		client_cmd(id,"spk %s",afternoonsounds[random_num(0,4)])
	}else if(hrs<=23){
		client_cmd(id,"spk %s",evningsounds[random_num(0,2)])
	}
}
//--------------------------------------------------------------------------------	
public save_data(id){
	new user[32],value[64]
	
	get_user_authid(id,user,31)
	
	set_time()
	formatex(value,63,"%s %s %s %s %s",chour,cmin,cday,cm,cyear)
	nvault_set(vault,user,value) // save
}
//--------------------------------------------------------------------------------
public set_messages(){
	// Set greet messages option
	if(g_messages[32]==false){
		g_messages[32]=true
		nvault_set(vault,"set_messages","1")
		log_amx(">>> Greet messages is enabled")
		server_print("%s Greet messages is enabled",tag)
	}else{
		g_messages[32]=false
		nvault_set(vault,"set_messages","0")
		log_amx(">>> Greet messages is disabled")
		server_print("%s Greet messages is disabled",tag)
	}
}
public set_sounds(){
	// Set greet sounds option
	if(g_sounds[32]==false){
		g_sounds[32]=true
		nvault_set(vault,"set_sounds","1")
		log_amx(">>> Greet sounds is enabled")
		server_print("%s Greet sounds is enabled",tag)
	}else{
		g_sounds[32]=false
		nvault_set(vault,"set_sounds","0")
		log_amx(">>> Greet sounds is disabled")
		server_print("%s Greet sounds is disabled",tag)
	}
}
//--------------------------------------------------------------------------------
public say_lastvisited(id){
	// say /lv
	new shour[6],smin[6],sday[6],sm[6],syear[6],value[64],user[32]
	
	get_user_authid(id,user,31)
	
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
}
Изображение Изображение Изображение

Потребителски аватар

Автор на темата
Darkness*
Потребител
Потребител
Мнения: 28
Регистриран: 07 фев 2019, 00:10
Се отблагодари: 1 път
Получена благодарност: 1 път

Заявка за направа на Плъгин

Мнение от Darkness* » 07 фев 2019, 00:34

Fatall написа:
07 фев 2019, 00:23
Погледни това
Oпиcaниe: Зaпoмня пocлeднoтo пoceщeниe нa игpaчa.

Ocoбeнocти:
- Πoздpaвитeлни cъoбщeния
- Πoздpaвитeлни звyци
- Зaпaзвa ĸoнфигypaциятa в в фaйлa nvаult

СVАR-ѕ:
аmх_lv_mеѕѕаgеѕ - Оn(1)/Оff(0) - Πoздpaв.
аmх_lv_ѕоundѕ - Оn(1)/Оff(0) - Πoздpaв cъc звyĸ.

Cнимĸa:
1297700925_tdxd6ja2.jpg

Код: Избери всички

/* Plugin generated by AMXX-Studio */

/*
AMX Mod X Plugin

Last Visited by GordonFreeman

Plugin made:
- Remembers the last time a player visits the server

Features:
- Greet messages
- Greet sounds
- Store configuration in nvault file

Type in chat:
/lastvisited or /lv for last visited info :)


I REAL LIKE nVault system!!!
*/
//-----------------------------------------------------------------------
#include <amxmodx>
#include <nvault>
//-----------------------------------------------------------------------
#define PLUGIN "Last Visited"
#define VERSION "1.1"
#define AUTHOR "GordonFreeman"
//-----------------------------------------------------------------------
new vault
new const tag[]="[LV]"
new chour[6],cmin[6],cday[6],cm[6],cyear[6],ctime[32] //  TIME IS NOW
new bool:g_messages[33],bool:g_sounds[33] // Cvars :)
//-----------------------------------------------------------------------
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	// Client commands
	register_clcmd("say /lastvisited","say_lastvisited")
	register_clcmd("say /lv","say_lastvisited")
	// Server commands
	register_srvcmd("amx_lv_messages","set_messages") // messages cvar
	register_srvcmd("amx_lv_sounds","set_sounds") // sounds cvar
	
	vault=nvault_open("last_visited") // the vault
	
	set_time() // Set current time
}
//-----------------------------------------------------------------------
public plugin_end(){
	nvault_close(vault)
}
//-----------------------------------------------------------------------
public plugin_cfg(){
	// Get plugin configuration
	new messages_status=nvault_get(vault,"set_messages")
	new sounds_status=nvault_get(vault,"set_sounds")
	
	// Set greet messages status
	if(messages_status==0){
		g_messages[32]=false
	}else{
		g_messages[32]=true
	}
	
	// Set greet sounds status
	if(sounds_status==0){
		g_sounds[32]=false
	}else{
		g_sounds[32]=true
	}
}
//-----------------------------------------------------------------------
public set_time(){
	get_time("%H",chour,5) 	// Hours
	get_time("%M",cmin,5) 	// Minutes
	get_time("%d",cday,5)	// Day
	get_time("%m",cm,5)	// Mounth
	get_time("%Y",cyear,5)	// Year
	get_time("%H:%M:%S - %m/%d/%Y",ctime,31) // the time
}
//-----------------------------------------------------------------------
public client_putinserver(id){
	set_time()
	set_task(5.0,"check_data",id) // it's begining :)
}
//-----------------------------------------------------------------------
public check_data(id){
	set_time()
	new user[32],nick[31],value[64]
	new shour[6],smin[6],sday[6],sm[6],syear[6] // stored time
	
	get_user_authid(id,user,31)
	get_user_name(id,nick,31)
	
	// Get stored time
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	if(g_messages[32]==true)greet_messages(id)
	if(g_sounds[32]==true)greet_sounds(id)
	
	if(nvault_get(vault,user)==0){
		client_print(id,print_chat,"%s You have not played here",tag)
	}else{
		client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
	}
	
	save_data(id)
}
//------------------------------------------------------------------------------	
public greet_messages(id){
	new user[32],hostname[64]
	
	new hrs=str_to_num(chour)
	
	get_user_name(id,user,31)
	
	get_cvar_string("hostname",hostname,63)
	
	set_time()
	
	if(hrs<12){
		client_print(id,print_chat,"%s Good Morning %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=16){
		client_print(id,print_chat,"%s Good Afternoon %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=23){
		client_print(id,print_chat,"%s Good Evening %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=03){
		client_print(id,print_chat,"%s Good Night %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else{
		client_print(id,print_chat,"%s Hello %s! Welocme to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}
}
//-------------------------------------------------------------------------------
public greet_sounds(id){
	new hrs=str_to_num(chour)
	
	new morningsounds[2][]={
		"scientist/c1a0_sci_gm(e55)",
		"scientist/c1a0_sci_gm1(e60)"
	}
	new afternoonsounds[5][]={
		"scientist/goodtoseeyou",
		"scientist/greetings",
		"scientist/greetings2",
		"scientist/hellofreeman(e35)",
		"scientist/hellothere"
	}
	new evningsounds[3][]={
		"scientist/hellothere",
		"scientist/greetings",
		"scientist/c1a0_sci_itsyou"
	}
	if(hrs<=12){
		client_cmd(id,"spk %s",morningsounds[random_num(0,1)])
	}else if(hrs<=16){
		client_cmd(id,"spk %s",afternoonsounds[random_num(0,4)])
	}else if(hrs<=23){
		client_cmd(id,"spk %s",evningsounds[random_num(0,2)])
	}
}
//--------------------------------------------------------------------------------	
public save_data(id){
	new user[32],value[64]
	
	get_user_authid(id,user,31)
	
	set_time()
	formatex(value,63,"%s %s %s %s %s",chour,cmin,cday,cm,cyear)
	nvault_set(vault,user,value) // save
}
//--------------------------------------------------------------------------------
public set_messages(){
	// Set greet messages option
	if(g_messages[32]==false){
		g_messages[32]=true
		nvault_set(vault,"set_messages","1")
		log_amx(">>> Greet messages is enabled")
		server_print("%s Greet messages is enabled",tag)
	}else{
		g_messages[32]=false
		nvault_set(vault,"set_messages","0")
		log_amx(">>> Greet messages is disabled")
		server_print("%s Greet messages is disabled",tag)
	}
}
public set_sounds(){
	// Set greet sounds option
	if(g_sounds[32]==false){
		g_sounds[32]=true
		nvault_set(vault,"set_sounds","1")
		log_amx(">>> Greet sounds is enabled")
		server_print("%s Greet sounds is enabled",tag)
	}else{
		g_sounds[32]=false
		nvault_set(vault,"set_sounds","0")
		log_amx(">>> Greet sounds is disabled")
		server_print("%s Greet sounds is disabled",tag)
	}
}
//--------------------------------------------------------------------------------
public say_lastvisited(id){
	// say /lv
	new shour[6],smin[6],sday[6],sm[6],syear[6],value[64],user[32]
	
	get_user_authid(id,user,31)
	
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
}
Мерси много, но би ли ми го направил с да изписва съобщенията цветни ?

Потребителски аватар

thoughtz 821E3
Тестов модератор
Тестов модератор
Мнения: 311
Регистриран: 13 окт 2016, 00:32
Местоположение: гр. София
Се отблагодари: 24 пъти
Получена благодарност: 26 пъти
Години: 27
Контакти:

Заявка за направа на Плъгин

Мнение от thoughtz 821E3 » 07 фев 2019, 00:43

Darkness* написа:
07 фев 2019, 00:34
Fatall написа:
07 фев 2019, 00:23
Погледни това
Oпиcaниe: Зaпoмня пocлeднoтo пoceщeниe нa игpaчa.

Ocoбeнocти:
- Πoздpaвитeлни cъoбщeния
- Πoздpaвитeлни звyци
- Зaпaзвa ĸoнфигypaциятa в в фaйлa nvаult

СVАR-ѕ:
аmх_lv_mеѕѕаgеѕ - Оn(1)/Оff(0) - Πoздpaв.
аmх_lv_ѕоundѕ - Оn(1)/Оff(0) - Πoздpaв cъc звyĸ.

Cнимĸa:
1297700925_tdxd6ja2.jpg

Код: Избери всички

/* Plugin generated by AMXX-Studio */

/*
AMX Mod X Plugin

Last Visited by GordonFreeman

Plugin made:
- Remembers the last time a player visits the server

Features:
- Greet messages
- Greet sounds
- Store configuration in nvault file

Type in chat:
/lastvisited or /lv for last visited info :)


I REAL LIKE nVault system!!!
*/
//-----------------------------------------------------------------------
#include <amxmodx>
#include <nvault>
//-----------------------------------------------------------------------
#define PLUGIN "Last Visited"
#define VERSION "1.1"
#define AUTHOR "GordonFreeman"
//-----------------------------------------------------------------------
new vault
new const tag[]="[LV]"
new chour[6],cmin[6],cday[6],cm[6],cyear[6],ctime[32] //  TIME IS NOW
new bool:g_messages[33],bool:g_sounds[33] // Cvars :)
//-----------------------------------------------------------------------
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	// Client commands
	register_clcmd("say /lastvisited","say_lastvisited")
	register_clcmd("say /lv","say_lastvisited")
	// Server commands
	register_srvcmd("amx_lv_messages","set_messages") // messages cvar
	register_srvcmd("amx_lv_sounds","set_sounds") // sounds cvar
	
	vault=nvault_open("last_visited") // the vault
	
	set_time() // Set current time
}
//-----------------------------------------------------------------------
public plugin_end(){
	nvault_close(vault)
}
//-----------------------------------------------------------------------
public plugin_cfg(){
	// Get plugin configuration
	new messages_status=nvault_get(vault,"set_messages")
	new sounds_status=nvault_get(vault,"set_sounds")
	
	// Set greet messages status
	if(messages_status==0){
		g_messages[32]=false
	}else{
		g_messages[32]=true
	}
	
	// Set greet sounds status
	if(sounds_status==0){
		g_sounds[32]=false
	}else{
		g_sounds[32]=true
	}
}
//-----------------------------------------------------------------------
public set_time(){
	get_time("%H",chour,5) 	// Hours
	get_time("%M",cmin,5) 	// Minutes
	get_time("%d",cday,5)	// Day
	get_time("%m",cm,5)	// Mounth
	get_time("%Y",cyear,5)	// Year
	get_time("%H:%M:%S - %m/%d/%Y",ctime,31) // the time
}
//-----------------------------------------------------------------------
public client_putinserver(id){
	set_time()
	set_task(5.0,"check_data",id) // it's begining :)
}
//-----------------------------------------------------------------------
public check_data(id){
	set_time()
	new user[32],nick[31],value[64]
	new shour[6],smin[6],sday[6],sm[6],syear[6] // stored time
	
	get_user_authid(id,user,31)
	get_user_name(id,nick,31)
	
	// Get stored time
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	if(g_messages[32]==true)greet_messages(id)
	if(g_sounds[32]==true)greet_sounds(id)
	
	if(nvault_get(vault,user)==0){
		client_print(id,print_chat,"%s You have not played here",tag)
	}else{
		client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
	}
	
	save_data(id)
}
//------------------------------------------------------------------------------	
public greet_messages(id){
	new user[32],hostname[64]
	
	new hrs=str_to_num(chour)
	
	get_user_name(id,user,31)
	
	get_cvar_string("hostname",hostname,63)
	
	set_time()
	
	if(hrs<12){
		client_print(id,print_chat,"%s Good Morning %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=16){
		client_print(id,print_chat,"%s Good Afternoon %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=23){
		client_print(id,print_chat,"%s Good Evening %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=03){
		client_print(id,print_chat,"%s Good Night %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else{
		client_print(id,print_chat,"%s Hello %s! Welocme to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}
}
//-------------------------------------------------------------------------------
public greet_sounds(id){
	new hrs=str_to_num(chour)
	
	new morningsounds[2][]={
		"scientist/c1a0_sci_gm(e55)",
		"scientist/c1a0_sci_gm1(e60)"
	}
	new afternoonsounds[5][]={
		"scientist/goodtoseeyou",
		"scientist/greetings",
		"scientist/greetings2",
		"scientist/hellofreeman(e35)",
		"scientist/hellothere"
	}
	new evningsounds[3][]={
		"scientist/hellothere",
		"scientist/greetings",
		"scientist/c1a0_sci_itsyou"
	}
	if(hrs<=12){
		client_cmd(id,"spk %s",morningsounds[random_num(0,1)])
	}else if(hrs<=16){
		client_cmd(id,"spk %s",afternoonsounds[random_num(0,4)])
	}else if(hrs<=23){
		client_cmd(id,"spk %s",evningsounds[random_num(0,2)])
	}
}
//--------------------------------------------------------------------------------	
public save_data(id){
	new user[32],value[64]
	
	get_user_authid(id,user,31)
	
	set_time()
	formatex(value,63,"%s %s %s %s %s",chour,cmin,cday,cm,cyear)
	nvault_set(vault,user,value) // save
}
//--------------------------------------------------------------------------------
public set_messages(){
	// Set greet messages option
	if(g_messages[32]==false){
		g_messages[32]=true
		nvault_set(vault,"set_messages","1")
		log_amx(">>> Greet messages is enabled")
		server_print("%s Greet messages is enabled",tag)
	}else{
		g_messages[32]=false
		nvault_set(vault,"set_messages","0")
		log_amx(">>> Greet messages is disabled")
		server_print("%s Greet messages is disabled",tag)
	}
}
public set_sounds(){
	// Set greet sounds option
	if(g_sounds[32]==false){
		g_sounds[32]=true
		nvault_set(vault,"set_sounds","1")
		log_amx(">>> Greet sounds is enabled")
		server_print("%s Greet sounds is enabled",tag)
	}else{
		g_sounds[32]=false
		nvault_set(vault,"set_sounds","0")
		log_amx(">>> Greet sounds is disabled")
		server_print("%s Greet sounds is disabled",tag)
	}
}
//--------------------------------------------------------------------------------
public say_lastvisited(id){
	// say /lv
	new shour[6],smin[6],sday[6],sm[6],syear[6],value[64],user[32]
	
	get_user_authid(id,user,31)
	
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
}
Мерси много, но би ли ми го направил с да изписва съобщенията цветни ?
Това ще ти помогне да се научиш как да го направиш сам.
https://www.amxx-bg.info/viewtopic.php?f=26&t=732

Ако не успееш, пиши и ще ти се помогне.

Потребителски аватар

Автор на темата
Darkness*
Потребител
Потребител
Мнения: 28
Регистриран: 07 фев 2019, 00:10
Се отблагодари: 1 път
Получена благодарност: 1 път

Заявка за направа на Плъгин

Мнение от Darkness* » 07 фев 2019, 00:49

thoughtz написа:
07 фев 2019, 00:43
Darkness* написа:
07 фев 2019, 00:34
Fatall написа:
07 фев 2019, 00:23
Погледни това
Oпиcaниe: Зaпoмня пocлeднoтo пoceщeниe нa игpaчa.

Ocoбeнocти:
- Πoздpaвитeлни cъoбщeния
- Πoздpaвитeлни звyци
- Зaпaзвa ĸoнфигypaциятa в в фaйлa nvаult

СVАR-ѕ:
аmх_lv_mеѕѕаgеѕ - Оn(1)/Оff(0) - Πoздpaв.
аmх_lv_ѕоundѕ - Оn(1)/Оff(0) - Πoздpaв cъc звyĸ.

Cнимĸa:
1297700925_tdxd6ja2.jpg

Код: Избери всички

/* Plugin generated by AMXX-Studio */

/*
AMX Mod X Plugin

Last Visited by GordonFreeman

Plugin made:
- Remembers the last time a player visits the server

Features:
- Greet messages
- Greet sounds
- Store configuration in nvault file

Type in chat:
/lastvisited or /lv for last visited info :)


I REAL LIKE nVault system!!!
*/
//-----------------------------------------------------------------------
#include <amxmodx>
#include <nvault>
//-----------------------------------------------------------------------
#define PLUGIN "Last Visited"
#define VERSION "1.1"
#define AUTHOR "GordonFreeman"
//-----------------------------------------------------------------------
new vault
new const tag[]="[LV]"
new chour[6],cmin[6],cday[6],cm[6],cyear[6],ctime[32] //  TIME IS NOW
new bool:g_messages[33],bool:g_sounds[33] // Cvars :)
//-----------------------------------------------------------------------
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	// Client commands
	register_clcmd("say /lastvisited","say_lastvisited")
	register_clcmd("say /lv","say_lastvisited")
	// Server commands
	register_srvcmd("amx_lv_messages","set_messages") // messages cvar
	register_srvcmd("amx_lv_sounds","set_sounds") // sounds cvar
	
	vault=nvault_open("last_visited") // the vault
	
	set_time() // Set current time
}
//-----------------------------------------------------------------------
public plugin_end(){
	nvault_close(vault)
}
//-----------------------------------------------------------------------
public plugin_cfg(){
	// Get plugin configuration
	new messages_status=nvault_get(vault,"set_messages")
	new sounds_status=nvault_get(vault,"set_sounds")
	
	// Set greet messages status
	if(messages_status==0){
		g_messages[32]=false
	}else{
		g_messages[32]=true
	}
	
	// Set greet sounds status
	if(sounds_status==0){
		g_sounds[32]=false
	}else{
		g_sounds[32]=true
	}
}
//-----------------------------------------------------------------------
public set_time(){
	get_time("%H",chour,5) 	// Hours
	get_time("%M",cmin,5) 	// Minutes
	get_time("%d",cday,5)	// Day
	get_time("%m",cm,5)	// Mounth
	get_time("%Y",cyear,5)	// Year
	get_time("%H:%M:%S - %m/%d/%Y",ctime,31) // the time
}
//-----------------------------------------------------------------------
public client_putinserver(id){
	set_time()
	set_task(5.0,"check_data",id) // it's begining :)
}
//-----------------------------------------------------------------------
public check_data(id){
	set_time()
	new user[32],nick[31],value[64]
	new shour[6],smin[6],sday[6],sm[6],syear[6] // stored time
	
	get_user_authid(id,user,31)
	get_user_name(id,nick,31)
	
	// Get stored time
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	if(g_messages[32]==true)greet_messages(id)
	if(g_sounds[32]==true)greet_sounds(id)
	
	if(nvault_get(vault,user)==0){
		client_print(id,print_chat,"%s You have not played here",tag)
	}else{
		client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
	}
	
	save_data(id)
}
//------------------------------------------------------------------------------	
public greet_messages(id){
	new user[32],hostname[64]
	
	new hrs=str_to_num(chour)
	
	get_user_name(id,user,31)
	
	get_cvar_string("hostname",hostname,63)
	
	set_time()
	
	if(hrs<12){
		client_print(id,print_chat,"%s Good Morning %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=16){
		client_print(id,print_chat,"%s Good Afternoon %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=23){
		client_print(id,print_chat,"%s Good Evening %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=03){
		client_print(id,print_chat,"%s Good Night %s! Welcome to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}else{
		client_print(id,print_chat,"%s Hello %s! Welocme to %s",tag,user,hostname)
		client_print(id,print_chat,"%s The time is now - %s",tag,ctime)
	}
}
//-------------------------------------------------------------------------------
public greet_sounds(id){
	new hrs=str_to_num(chour)
	
	new morningsounds[2][]={
		"scientist/c1a0_sci_gm(e55)",
		"scientist/c1a0_sci_gm1(e60)"
	}
	new afternoonsounds[5][]={
		"scientist/goodtoseeyou",
		"scientist/greetings",
		"scientist/greetings2",
		"scientist/hellofreeman(e35)",
		"scientist/hellothere"
	}
	new evningsounds[3][]={
		"scientist/hellothere",
		"scientist/greetings",
		"scientist/c1a0_sci_itsyou"
	}
	if(hrs<=12){
		client_cmd(id,"spk %s",morningsounds[random_num(0,1)])
	}else if(hrs<=16){
		client_cmd(id,"spk %s",afternoonsounds[random_num(0,4)])
	}else if(hrs<=23){
		client_cmd(id,"spk %s",evningsounds[random_num(0,2)])
	}
}
//--------------------------------------------------------------------------------	
public save_data(id){
	new user[32],value[64]
	
	get_user_authid(id,user,31)
	
	set_time()
	formatex(value,63,"%s %s %s %s %s",chour,cmin,cday,cm,cyear)
	nvault_set(vault,user,value) // save
}
//--------------------------------------------------------------------------------
public set_messages(){
	// Set greet messages option
	if(g_messages[32]==false){
		g_messages[32]=true
		nvault_set(vault,"set_messages","1")
		log_amx(">>> Greet messages is enabled")
		server_print("%s Greet messages is enabled",tag)
	}else{
		g_messages[32]=false
		nvault_set(vault,"set_messages","0")
		log_amx(">>> Greet messages is disabled")
		server_print("%s Greet messages is disabled",tag)
	}
}
public set_sounds(){
	// Set greet sounds option
	if(g_sounds[32]==false){
		g_sounds[32]=true
		nvault_set(vault,"set_sounds","1")
		log_amx(">>> Greet sounds is enabled")
		server_print("%s Greet sounds is enabled",tag)
	}else{
		g_sounds[32]=false
		nvault_set(vault,"set_sounds","0")
		log_amx(">>> Greet sounds is disabled")
		server_print("%s Greet sounds is disabled",tag)
	}
}
//--------------------------------------------------------------------------------
public say_lastvisited(id){
	// say /lv
	new shour[6],smin[6],sday[6],sm[6],syear[6],value[64],user[32]
	
	get_user_authid(id,user,31)
	
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	client_print(id,print_chat,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
}
Мерси много, но би ли ми го направил с да изписва съобщенията цветни ?
Това ще ти помогне да се научиш как да го направиш сам.
https://www.amxx-bg.info/viewtopic.php?f=26&t=732

Ако не успееш, пиши и ще ти се помогне.
Честно казано, преди време се занимавах с тези работи и сега искам да помогна на мой колеги наядвам се да не е проблем от това :) Ако успеете и имате време да го направите тук съм.

Потребителски аватар

thoughtz 821E3
Тестов модератор
Тестов модератор
Мнения: 311
Регистриран: 13 окт 2016, 00:32
Местоположение: гр. София
Се отблагодари: 24 пъти
Получена благодарност: 26 пъти
Години: 27
Контакти:

Заявка за направа на Плъгин

Мнение от thoughtz 821E3 » 07 фев 2019, 01:06

Код: Избери всички

/* Plugin generated by AMXX-Studio */

/*
AMX Mod X Plugin

Last Visited by GordonFreeman

Plugin made:
- Remembers the last time a player visits the server

Features:
- Greet messages
- Greet sounds
- Store configuration in nvault file

Type in chat:
/lastvisited or /lv for last visited info :)


I REAL LIKE nVault system!!!
*/
//-----------------------------------------------------------------------
#include <amxmodx>
#include <nvault>
#include <cromchat>
//-----------------------------------------------------------------------
#define PLUGIN "Last Visited"
#define VERSION "1.1"
#define AUTHOR "GordonFreeman"
//-----------------------------------------------------------------------
new vault
new const tag[]="[LV]"
new chour[6],cmin[6],cday[6],cm[6],cyear[6],ctime[32] //  TIME IS NOW
new bool:g_messages[33],bool:g_sounds[33] // Cvars :)
//-----------------------------------------------------------------------
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	// Client commands
	register_clcmd("say /lastvisited","say_lastvisited")
	register_clcmd("say /lv","say_lastvisited")
	// Server commands
	register_srvcmd("amx_lv_messages","set_messages") // messages cvar
	register_srvcmd("amx_lv_sounds","set_sounds") // sounds cvar
	
	vault=nvault_open("last_visited") // the vault
	
	set_time() // Set current time
}
//-----------------------------------------------------------------------
public plugin_end(){
	nvault_close(vault)
}
//-----------------------------------------------------------------------
public plugin_cfg(){
	// Get plugin configuration
	new messages_status=nvault_get(vault,"set_messages")
	new sounds_status=nvault_get(vault,"set_sounds")
	
	// Set greet messages status
	if(messages_status==0){
		g_messages[32]=false
	}else{
		g_messages[32]=true
	}
	
	// Set greet sounds status
	if(sounds_status==0){
		g_sounds[32]=false
	}else{
		g_sounds[32]=true
	}
}
//-----------------------------------------------------------------------
public set_time(){
	get_time("%H",chour,5) 	// Hours
	get_time("%M",cmin,5) 	// Minutes
	get_time("%d",cday,5)	// Day
	get_time("%m",cm,5)	// Mounth
	get_time("%Y",cyear,5)	// Year
	get_time("%H:%M:%S - %m/%d/%Y",ctime,31) // the time
}
//-----------------------------------------------------------------------
public client_putinserver(id){
	set_time()
	set_task(5.0,"check_data",id) // it's begining :)
}
//-----------------------------------------------------------------------
public check_data(id){
	set_time()
	new user[32],nick[31],value[64]
	new shour[6],smin[6],sday[6],sm[6],syear[6] // stored time
	
	get_user_authid(id,user,31)
	get_user_name(id,nick,31)
	
	// Get stored time
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	if(g_messages[32]==true)greet_messages(id)
	if(g_sounds[32]==true)greet_sounds(id)
	
	if(nvault_get(vault,user)==0){
		CC_SendMessage(id,"%s You have not played here",tag)
	}else{
		CC_SendMessage(id,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
	}
	
	save_data(id)
}
//------------------------------------------------------------------------------	
public greet_messages(id){
	new user[32],hostname[64]
	
	new hrs=str_to_num(chour)
	
	get_user_name(id,user,31)
	
	get_cvar_string("hostname",hostname,63)
	
	set_time()
	
	if(hrs<12){
		CC_SendMessage(id,"%s Good Morning %s! Welcome to %s",tag,user,hostname)
		CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=16){
	CC_SendMessage(id,"%s Good Afternoon %s! Welcome to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=23){
	CC_SendMessage(id,"%s Good Evening %s! Welcome to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=03){
	CC_SendMessage(id,"%s Good Night %s! Welcome to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else{
	CC_SendMessage(id,"%s Hello %s! Welocme to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}
}
//-------------------------------------------------------------------------------
public greet_sounds(id){
	new hrs=str_to_num(chour)
	
	new morningsounds[2][]={
		"scientist/c1a0_sci_gm(e55)",
		"scientist/c1a0_sci_gm1(e60)"
	}
	new afternoonsounds[5][]={
		"scientist/goodtoseeyou",
		"scientist/greetings",
		"scientist/greetings2",
		"scientist/hellofreeman(e35)",
		"scientist/hellothere"
	}
	new evningsounds[3][]={
		"scientist/hellothere",
		"scientist/greetings",
		"scientist/c1a0_sci_itsyou"
	}
	if(hrs<=12){
		client_cmd(id,"spk %s",morningsounds[random_num(0,1)])
	}else if(hrs<=16){
		client_cmd(id,"spk %s",afternoonsounds[random_num(0,4)])
	}else if(hrs<=23){
		client_cmd(id,"spk %s",evningsounds[random_num(0,2)])
	}
}
//--------------------------------------------------------------------------------	
public save_data(id){
	new user[32],value[64]
	
	get_user_authid(id,user,31)
	
	set_time()
	formatex(value,63,"%s %s %s %s %s",chour,cmin,cday,cm,cyear)
	nvault_set(vault,user,value) // save
}
//--------------------------------------------------------------------------------
public set_messages(){
	// Set greet messages option
	if(g_messages[32]==false){
		g_messages[32]=true
		nvault_set(vault,"set_messages","1")
		log_amx(">>> Greet messages is enabled")
		server_print("%s Greet messages is enabled",tag)
	}else{
		g_messages[32]=false
		nvault_set(vault,"set_messages","0")
		log_amx(">>> Greet messages is disabled")
		server_print("%s Greet messages is disabled",tag)
	}
}
public set_sounds(){
	// Set greet sounds option
	if(g_sounds[32]==false){
		g_sounds[32]=true
		nvault_set(vault,"set_sounds","1")
		log_amx(">>> Greet sounds is enabled")
		server_print("%s Greet sounds is enabled",tag)
	}else{
		g_sounds[32]=false
		nvault_set(vault,"set_sounds","0")
		log_amx(">>> Greet sounds is disabled")
		server_print("%s Greet sounds is disabled",tag)
	}
}
//--------------------------------------------------------------------------------
public say_lastvisited(id){
	// say /lv
	new shour[6],smin[6],sday[6],sm[6],syear[6],value[64],user[32]
	
	get_user_authid(id,user,31)
	
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
CC_SendMessage(id,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
}
Ето ти кода, оцветяваш текста който искаш с таговете от темата която ти дадох по-горе. (&x04, &x05 и т.н.)

Потребителски аватар

Автор на темата
Darkness*
Потребител
Потребител
Мнения: 28
Регистриран: 07 фев 2019, 00:10
Се отблагодари: 1 път
Получена благодарност: 1 път

Заявка за направа на Плъгин

Мнение от Darkness* » 07 фев 2019, 02:07

thoughtz написа:
07 фев 2019, 01:06

Код: Избери всички

/* Plugin generated by AMXX-Studio */

/*
AMX Mod X Plugin

Last Visited by GordonFreeman

Plugin made:
- Remembers the last time a player visits the server

Features:
- Greet messages
- Greet sounds
- Store configuration in nvault file

Type in chat:
/lastvisited or /lv for last visited info :)


I REAL LIKE nVault system!!!
*/
//-----------------------------------------------------------------------
#include <amxmodx>
#include <nvault>
#include <cromchat>
//-----------------------------------------------------------------------
#define PLUGIN "Last Visited"
#define VERSION "1.1"
#define AUTHOR "GordonFreeman"
//-----------------------------------------------------------------------
new vault
new const tag[]="[LV]"
new chour[6],cmin[6],cday[6],cm[6],cyear[6],ctime[32] //  TIME IS NOW
new bool:g_messages[33],bool:g_sounds[33] // Cvars :)
//-----------------------------------------------------------------------
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	// Client commands
	register_clcmd("say /lastvisited","say_lastvisited")
	register_clcmd("say /lv","say_lastvisited")
	// Server commands
	register_srvcmd("amx_lv_messages","set_messages") // messages cvar
	register_srvcmd("amx_lv_sounds","set_sounds") // sounds cvar
	
	vault=nvault_open("last_visited") // the vault
	
	set_time() // Set current time
}
//-----------------------------------------------------------------------
public plugin_end(){
	nvault_close(vault)
}
//-----------------------------------------------------------------------
public plugin_cfg(){
	// Get plugin configuration
	new messages_status=nvault_get(vault,"set_messages")
	new sounds_status=nvault_get(vault,"set_sounds")
	
	// Set greet messages status
	if(messages_status==0){
		g_messages[32]=false
	}else{
		g_messages[32]=true
	}
	
	// Set greet sounds status
	if(sounds_status==0){
		g_sounds[32]=false
	}else{
		g_sounds[32]=true
	}
}
//-----------------------------------------------------------------------
public set_time(){
	get_time("%H",chour,5) 	// Hours
	get_time("%M",cmin,5) 	// Minutes
	get_time("%d",cday,5)	// Day
	get_time("%m",cm,5)	// Mounth
	get_time("%Y",cyear,5)	// Year
	get_time("%H:%M:%S - %m/%d/%Y",ctime,31) // the time
}
//-----------------------------------------------------------------------
public client_putinserver(id){
	set_time()
	set_task(5.0,"check_data",id) // it's begining :)
}
//-----------------------------------------------------------------------
public check_data(id){
	set_time()
	new user[32],nick[31],value[64]
	new shour[6],smin[6],sday[6],sm[6],syear[6] // stored time
	
	get_user_authid(id,user,31)
	get_user_name(id,nick,31)
	
	// Get stored time
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	if(g_messages[32]==true)greet_messages(id)
	if(g_sounds[32]==true)greet_sounds(id)
	
	if(nvault_get(vault,user)==0){
		CC_SendMessage(id,"%s You have not played here",tag)
	}else{
		CC_SendMessage(id,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
	}
	
	save_data(id)
}
//------------------------------------------------------------------------------	
public greet_messages(id){
	new user[32],hostname[64]
	
	new hrs=str_to_num(chour)
	
	get_user_name(id,user,31)
	
	get_cvar_string("hostname",hostname,63)
	
	set_time()
	
	if(hrs<12){
		CC_SendMessage(id,"%s Good Morning %s! Welcome to %s",tag,user,hostname)
		CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=16){
	CC_SendMessage(id,"%s Good Afternoon %s! Welcome to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=23){
	CC_SendMessage(id,"%s Good Evening %s! Welcome to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else if(hrs<=03){
	CC_SendMessage(id,"%s Good Night %s! Welcome to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}else{
	CC_SendMessage(id,"%s Hello %s! Welocme to %s",tag,user,hostname)
	CC_SendMessage(id,"%s The time is now - %s",tag,ctime)
	}
}
//-------------------------------------------------------------------------------
public greet_sounds(id){
	new hrs=str_to_num(chour)
	
	new morningsounds[2][]={
		"scientist/c1a0_sci_gm(e55)",
		"scientist/c1a0_sci_gm1(e60)"
	}
	new afternoonsounds[5][]={
		"scientist/goodtoseeyou",
		"scientist/greetings",
		"scientist/greetings2",
		"scientist/hellofreeman(e35)",
		"scientist/hellothere"
	}
	new evningsounds[3][]={
		"scientist/hellothere",
		"scientist/greetings",
		"scientist/c1a0_sci_itsyou"
	}
	if(hrs<=12){
		client_cmd(id,"spk %s",morningsounds[random_num(0,1)])
	}else if(hrs<=16){
		client_cmd(id,"spk %s",afternoonsounds[random_num(0,4)])
	}else if(hrs<=23){
		client_cmd(id,"spk %s",evningsounds[random_num(0,2)])
	}
}
//--------------------------------------------------------------------------------	
public save_data(id){
	new user[32],value[64]
	
	get_user_authid(id,user,31)
	
	set_time()
	formatex(value,63,"%s %s %s %s %s",chour,cmin,cday,cm,cyear)
	nvault_set(vault,user,value) // save
}
//--------------------------------------------------------------------------------
public set_messages(){
	// Set greet messages option
	if(g_messages[32]==false){
		g_messages[32]=true
		nvault_set(vault,"set_messages","1")
		log_amx(">>> Greet messages is enabled")
		server_print("%s Greet messages is enabled",tag)
	}else{
		g_messages[32]=false
		nvault_set(vault,"set_messages","0")
		log_amx(">>> Greet messages is disabled")
		server_print("%s Greet messages is disabled",tag)
	}
}
public set_sounds(){
	// Set greet sounds option
	if(g_sounds[32]==false){
		g_sounds[32]=true
		nvault_set(vault,"set_sounds","1")
		log_amx(">>> Greet sounds is enabled")
		server_print("%s Greet sounds is enabled",tag)
	}else{
		g_sounds[32]=false
		nvault_set(vault,"set_sounds","0")
		log_amx(">>> Greet sounds is disabled")
		server_print("%s Greet sounds is disabled",tag)
	}
}
//--------------------------------------------------------------------------------
public say_lastvisited(id){
	// say /lv
	new shour[6],smin[6],sday[6],sm[6],syear[6],value[64],user[32]
	
	get_user_authid(id,user,31)
	
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
CC_SendMessage(id,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
}
Ето ти кода, оцветяваш текста който искаш с таговете от темата която ти дадох по-горе. (&x04, &x05 и т.н.)
Уникален е. Бих искал да премахнете тези съобщения - http://prikachi.com/images.php?images/696/9499696A.png и да се показват само тези -

Код: Избери всички

		CC_SendMessage(id,"%s You have not played here",tag)
	}else{
		CC_SendMessage(id,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)

Потребителски аватар

mi0 mi0 ;)
Потребител
Потребител
Мнения: 93
Регистриран: 09 дек 2016, 22:02
Се отблагодари: 6 пъти
Получена благодарност: 8 пъти
Години: 25

Заявка за направа на Плъгин

Мнение от mi0 mi0 ;) » 07 фев 2019, 02:51

Код: Избери всички

/* Plugin generated by AMXX-Studio */

/*
AMX Mod X Plugin

Last Visited by GordonFreeman

Plugin made:
- Remembers the last time a player visits the server

Features:
- Greet messages
- Greet sounds
- Store configuration in nvault file

Type in chat:
/lastvisited or /lv for last visited info :)


I REAL LIKE nVault system!!!
*/
//-----------------------------------------------------------------------
#include <amxmodx>
#include <nvault>
#include <cromchat>
//-----------------------------------------------------------------------
#define PLUGIN "Last Visited"
#define VERSION "1.1"
#define AUTHOR "GordonFreeman"
//-----------------------------------------------------------------------
new vault
new const tag[]="[LV]"
new chour[6],cmin[6],cday[6],cm[6],cyear[6],ctime[32] //  TIME IS NOW
new bool:g_messages[33],bool:g_sounds[33] // Cvars :)
//-----------------------------------------------------------------------
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	// Client commands
	register_clcmd("say /lastvisited","say_lastvisited")
	register_clcmd("say /lv","say_lastvisited")
	// Server commands
	register_srvcmd("amx_lv_messages","set_messages") // messages cvar
	register_srvcmd("amx_lv_sounds","set_sounds") // sounds cvar
	
	vault=nvault_open("last_visited") // the vault
	
	set_time() // Set current time
}
//-----------------------------------------------------------------------
public plugin_end()
	nvault_close(vault)
//-----------------------------------------------------------------------
public plugin_cfg()
{
	// Get plugin configuration
	new messages_status=nvault_get(vault,"set_messages")
	new sounds_status=nvault_get(vault,"set_sounds")
	
	// Set greet messages status
	if(messages_status==0)
	{
		g_messages[32]=false
	}
	else
	{
		g_messages[32]=true
	}
	
	// Set greet sounds status
	if(sounds_status==0)
	{
		g_sounds[32]=false
	}
	else
	{
		g_sounds[32]=true
	}
}
//-----------------------------------------------------------------------
public set_time()
{
	get_time("%H",chour,5) 	// Hours
	get_time("%M",cmin,5) 	// Minutes
	get_time("%d",cday,5)	// Day
	get_time("%m",cm,5)	// Mounth
	get_time("%Y",cyear,5)	// Year
	get_time("%H:%M:%S - %m/%d/%Y",ctime,31) // the time
}
//-----------------------------------------------------------------------
public client_putinserver(id)
{
	set_time()
	set_task(5.0,"check_data",id) // it's begining :)
}
//-----------------------------------------------------------------------
public check_data(id)
{
	set_time()
	new user[32],nick[31],value[64]
	new shour[6],smin[6],sday[6],sm[6],syear[6] // stored time
	
	get_user_authid(id,user,31)
	get_user_name(id,nick,31)
	
	// Get stored time
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	if(g_sounds[32]==true)
		greet_sounds(id)
	
	if(nvault_get(vault,user)==0)
		CC_SendMessage(id,"%s You have not played here",tag)
	else
		CC_SendMessage(id,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
	
	save_data(id)
}

//-------------------------------------------------------------------------------
public greet_sounds(id)
{
	new hrs=str_to_num(chour)
	
	new morningsounds[2][] =
	{
		"scientist/c1a0_sci_gm(e55)",
		"scientist/c1a0_sci_gm1(e60)"
	}
	new afternoonsounds[5][] =
	{
		"scientist/goodtoseeyou",
		"scientist/greetings",
		"scientist/greetings2",
		"scientist/hellofreeman(e35)",
		"scientist/hellothere"
	}
	new evningsounds[3][]=
	{
		"scientist/hellothere",
		"scientist/greetings",
		"scientist/c1a0_sci_itsyou"
	}
	if(hrs<=12)
		client_cmd(id,"spk %s",morningsounds[random_num(0,1)])
	else if(hrs<=16)
		client_cmd(id,"spk %s",afternoonsounds[random_num(0,4)])
	else if(hrs<=23)
		client_cmd(id,"spk %s",evningsounds[random_num(0,2)])
}
//--------------------------------------------------------------------------------	
public save_data(id)
{
	new user[32],value[64]
	
	get_user_authid(id,user,31)
	
	set_time()
	formatex(value,63,"%s %s %s %s %s",chour,cmin,cday,cm,cyear)
	nvault_set(vault,user,value) // save
}
//--------------------------------------------------------------------------------
public set_messages()
{
	// Set greet messages option
	if(g_messages[32]==false)
	{
		g_messages[32]=true
		nvault_set(vault,"set_messages","1")
		log_amx(">>> Greet messages is enabled")
		server_print("%s Greet messages is enabled",tag)
	}
	else
	{
		g_messages[32]=false
		nvault_set(vault,"set_messages","0")
		log_amx(">>> Greet messages is disabled")
		server_print("%s Greet messages is disabled",tag)
	}
}
public set_sounds()
{
	// Set greet sounds option
	if(g_sounds[32]==false)
	{
		g_sounds[32]=true
		nvault_set(vault,"set_sounds","1")
		log_amx(">>> Greet sounds is enabled")
		server_print("%s Greet sounds is enabled",tag)
	}
	else
	{
		g_sounds[32]=false
		nvault_set(vault,"set_sounds","0")
		log_amx(">>> Greet sounds is disabled")
		server_print("%s Greet sounds is disabled",tag)
	}
}
//--------------------------------------------------------------------------------
public say_lastvisited(id){
	// say /lv
	new shour[6],smin[6],sday[6],sm[6],syear[6],value[64],user[32]
	
	get_user_authid(id,user,31)
	
	nvault_get(vault,user,value,63)
	parse(value,shour,5,smin,5,sday,5,sm,5,syear,5)
	
	CC_SendMessage(id,"%s The last time you played here at %s:%s - %s/%s/%s",tag,shour,smin,sm,sday,syear)
}

Потребителски аватар

stambeto2006 TM®
Тестов модератор
Тестов модератор
Мнения: 330
Регистриран: 06 окт 2016, 15:44
Се отблагодари: 20 пъти
Получена благодарност: 23 пъти
Години: 23
Контакти:

Заявка за направа на Плъгин

Мнение от stambeto2006 TM® » 07 фев 2019, 07:11

Darkness* Оправи си заглавието на темата, нищо не се разбира под това заглавие, което си задал в момента.
ИзображениеИзображение

Потребителски аватар

Автор на темата
Darkness*
Потребител
Потребител
Мнения: 28
Регистриран: 07 фев 2019, 00:10
Се отблагодари: 1 път
Получена благодарност: 1 път

Заявка за направа на Плъгин

Мнение от Darkness* » 07 фев 2019, 11:07

stambeto2006 написа:
07 фев 2019, 07:11
Darkness* Оправи си заглавието на темата, нищо не се разбира под това заглавие, което си задал в момента.
Оправено. :clap:

Потребителски аватар

summertime vibes
Тестов модератор
Тестов модератор
Мнения: 1026
Регистриран: 27 ное 2016, 17:47
Местоположение: In the Heaven
Се отблагодари: 43 пъти
Получена благодарност: 81 пъти
Контакти:

Заявка за направа на Плъгин - Last Visited

Мнение от summertime vibes » 07 фев 2019, 15:25

Стана ли плъгина?
Изображение

Потребителски аватар

Автор на темата
Darkness*
Потребител
Потребител
Мнения: 28
Регистриран: 07 фев 2019, 00:10
Се отблагодари: 1 път
Получена благодарност: 1 път

Заявка за направа на Плъгин - Last Visited

Мнение от Darkness* » 07 фев 2019, 15:56

Висчко е перфектно. Моля да :lock:

Заключена

Върни се в “Заявки за плъгини”

Кой е на линия

Потребители, разглеждащи този форум: Няма регистрирани потребители и 1 гост