Counter-Strike 1.6
CS1.BG | DUST2 NOSHTA GARMI [RANKED PLAY] #1
45.144.155.113:27015
de_dust2
Играчи: 30/32
de_dust2
Counter-Strike 1.6
Cs-PlovdiV.com - Aim Attack 93.123.16.4:27022 aim_aztec Играчи: 0/16

Top Prefix Chat

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
Huehue
Извън линия
Модератор
Модератор
Мнения: 352
Регистриран на: 16 Яну 2017, 23:42
Местоположение: София
Се отблагодари: 7 пъти
Получена благодарност: 171 пъти
Обратна връзка:

Re: Top Prefix Chat

Мнение от Huehue » 14 Сеп 2023, 00:20

cgozzie написа: 01 Сеп 2023, 04:06
Siska написа: 03 Фев 2023, 23:15 Този плъгин на хрома може ли да се направи да не премахва останалите префикси от ChatManager.ini, а да ги показва заедно ? Примерно , който е в топ15 има пред името си (TOP еди колко си), но ако е възможно искам в същото време , който е вип да пише и (VIP) и също , който има и друг префикс добавен и той да излиза. И ще стане [VIP] [TOP5] и евентуално , ако има и друг префикс и той ще е тук [VIP] [TOP5] [Prefix]
Ще може ли да се добави префикса VIP да излиза след TOP ползвам ChatManager.ini

Top5.sma

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

#include <amxmodx>
#include <hamsandwich>
#include <chatmanager>
#include <csstats>

#define VIP_FLAG ADMIN_LEVEL_H

const TOP_RANK = 5
#define TOP_PREFIX "&x04[Top %i]"

public plugin_init()
{
	register_plugin("CM: Top Prefix", "1.1", "OciXCrom")
	RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
}

public OnPlayerSpawn(id)
{
	if(!is_user_alive(id) || !is_user_vip(id))
		return

}

bool:is_user_vip(id)
	return !!(get_user_flags(id) & VIP_FLAG)

public cm_on_player_data_updated(id)
{
	static szRank[32], iStats[8], iHits[8]
	get_user_stats(id, iStats, iHits)

	if(iStats[7] <= TOP_RANK)
	{
		formatex(szRank, charsmax(szRank), TOP_PREFIX, iStats[7])
		cm_set_user_prefix(id, szRank)
	}
}
ChatManager.ini

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

#==============================================#
# Chat Manager by OciXCrom: Configuration file #
#==============================================#

# Colors: &x01 (DEFAULT), &x03 (TEAM COLOR); &x04 (GREEN); &x05 (WHITE); &x06 (BLUE); &x07 (RED)
# Combining two or more team colors is NOT POSSIBLE in CS 1.6: &x03, &x05, &x06, &x07 - only ONE of these can be used inside a message.

[Main Settings]
# If set to 1, all players will see all chats independent of whether they are dead or alive, excluding the other team's private chat.
# If set to 2, all players will see all chats, including the opposite team's private chat.
ALL_CHAT = 0

# Players with these flags will see all chats at all time, including all team chats.
ADMIN_LISTEN_FLAGS = m

# Whether players with the admin listen flag will be able to see the opposite team's chat.
ADMIN_LISTEN_TEAM_CHAT = 1

# When a player with this flag writes in chat, it will be visible for all players at all times.
GLOBAL_CHAT_FLAG = 

# Whether players with global chat will be visible when writing in their team's private chat.
GLOBAL_CHAT_TEAM = 0

# If the message starts with any of these symbols, it will be hidden in chat. Example: @, /, !
BLOCK_FIRST_SYMBOLS = @

# Prefixes for dead and alive players. Yes, you can set a prefix like *ALIVE* too.
DEAD_PREFIX = *DEAD*
ALIVE_PREFIX =

# The standard spectator prefix.
SPEC_PREFIX = *SPEC*

# Team prefixes that are usually shown in the team chat, in brackets.
TEAM_PREFIX_T = Terrorist
TEAM_PREFIX_CT = Counter-Terrorist
TEAM_PREFIX_SPEC = Spectator

# Text that will show when the plugin can't detect a player's location when using geoip.
ERROR_TEXT = ?

# Time formatting when $time$ is used. More info here: http://www.cplusplus.com/reference/ctime/strftime/
FORMAT_TIME = %X

# This is the file where chat messages will be logged. If you want to disable logging, leave this setting blank.
# Time formatting is available. Exmaple: chatmanager%m-%d-%Y.log
CHAT_LOG_FILE = chatmanager.log

# Format to use for the chat logs. Formats are defined in the [Format Definitions] section.
CHAT_LOG_SAY_FORMAT = log_say
CHAT_LOG_TEAM_FORMAT = log_team

# Here you can set a sound that will play when a message is written in chat. If it's blank, no sound will be played.
# Example: sound/your_sound.wav
SAY_SOUND =
SAY_TEAM_SOUND =

# Date format for use with expiration dates where available in sections down below.
# For a list of valid parameters, see: http://www.cplusplus.com/reference/ctime/strftime/
EXPIRATION_DATE_FORMAT = %d.%m.%Y

# What to do when the date for a specific extra has expired?
#   0 = ignore the entire line
#   1 = put a "#" symbol in the beginning of the line
#   2 = remove the entire line from the file
# Note that when the setting is non-zero, the entire file will be rewritten after being read.
EXPIRATION_DATE_BEHAVIOR = 0

# Players with this flag can use color codes in their message (&x01, &x03, &x04) in order to modify their message color.
COLORCHAT_FLAG = l

# Which method to use to hook chat messages.
#  0 = hook "say" and "say_team"
#  1 = hook "SayText" message
SAY_METHOD = 0

[Format Definitions]
# In this section you can define chat formats that you can assign to different users in the [User Formats] section.
# You should create a different format for the say and say_team chat, if you don't wan't them to look the same.
# You can use the following placeholders: $admin_prefix$, $dead_prefix$, $team$, $name$, $custom_name$, $ip$, $steam$, $userid$, $chat_color$, $message$, $time$
# You can also use these, but they need to be enabled in the .sma file first: $health$, $armor$, $frags$, $deaths$, $city$, $country$, $country_code$, $continent$, $continent_code$
# Using OciXCrom's Rank System gives you access to even more placeholders: $rank$, $current_xp$, $next_xp$, $level$, $next_level$, $next_rank$. Only the first one is enabled by default.
# To enable an additional placeholder, simply locate the #define ARG_ line in the beginning of the .sma file and uncomment it (remove //), then recompile the plugin.
# Syntax: format name = format style


format_admin = $dead_prefix$ &x04$admin_prefix$ &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$
format_admin_team = $dead_prefix$ ($team$) &x04$admin_prefix$ &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$
format_player = $dead_prefix$ &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$
format_player_team = $dead_prefix$ ($team$) &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$

steam_admin = $dead_prefix$ &x04[STEAM] $admin_prefix$ &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$
steam_admin_team = $dead_prefix$ ($team$) &x04[STEAM] $admin_prefix$ &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$
steam_player = $dead_prefix$ &x04[STEAM] &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$
steam_player_team = $dead_prefix$ ($team$) &x04[STEAM] &x01[&x04$rank$&x01] &x03$custom_name$ &x01: $chat_color$$message$

log_say = [ $ip$ | $steam$ ] $dead_prefix$ $name$: $message$
log_team = [ $ip$ | $steam$ ] ($team$) $dead_prefix$ $name$: $message$

# In the sections down below you can set different prefixes, chat colors and custom names for each player or a group of players.
# You can add an unlimited amount of these extras. Each new extra needs to be added on a new line in the correct section.
# Bear in mind that the extras that are higher in the list have priority over the ones below them.
# This means that if a player for example meets the requirements for 2 or more prefixes, he will receive the one that's first in the list.

# In the syntaxes, you will find a parameter called "type". This parameter can be one of the following: flag, name, ip, steam, anyflag or noprefix.
# If it's set to "flag" (or "flags"), the plugin will check if the player has ALL of the admin flags set in the "info" parameter. You can set multiple flags instead of only one.
# The "name", "ip" and "steam" settings will check if the player's name, IP or SteamID is equal to the one set in the "info" parameter.
# When set to "anyflag", it will check if the player has ANY of the admin flags specified in the "info" parameter.
# Setting it to "noprefix" will check if the player doesn't have a prefix set. The "info" parameter doesn't have a function in this case, so you can leave it blank.

# If you're using OciXCrom's Rank System, you can also use the parameter "level" to check the user's level.

# The "expiration date" parameter is optional, so you can skip it. If set, this will be the date until the extra will be active.
# If the date has passed, the plugin will ignore the entire line. Dates must be written in the same format as set in the DATE_FORMAT setting.
# If the DATE_FORMAT setting is empty or not found in the [Settings] section, the plugin will ignore the expiration date and the extra will be active all the time.

[Admin Prefixes]
# Тук можете да добавите персонализирани префикси към конкретни играчи или флагове, които се показват при използване $admin_prefix$.
# Syntax: "type" "info" "prefix" "[expiration date]"

;"name" "OciXCrom" "[Timed Prefix]" "31.12.2030"
;"name" "OciXCrom" "[Scripter]"
;"steam" "STEAM_0:0:50153248" "[CM Creator]"
;"ip" "127.0.0.1" "[BOT]"
"flag" "u" "&x05[&x05Owner&x05]"
;"flag" "l" "[Head Admin]"
;"flag" "d" "[Server Admin]"
;"flag" "e" "[Test Admin]"
;"flag" "mnp" "[Premium]"
;"flag" "s" "&x01[&x03TOP5+VIP&x01]"
"flag" "t" "[&x01V.I.P&x04]"
"flag" "" "[Newbie]"

# Colors: &x01 (DEFAULT), &x03 (TEAM COLOR); &x04 (GREEN); &x05 (WHITE); &x06 (BLUE); &x07 (RED)
# Combining two or more team colors is NOT POSSIBLE in CS 1.6: &x03, &x05, &x06, &x07 - only ONE of these can be used inside a message.

[Chat Colors]
# Тук можете да добавите различни цветове за чат към конкретни играчи или флаг, които се показват при използване $chat_color$.
# Syntax: "type" "info" "chat color" "[expiration date]"

"flag" "e" "&x04"
"flag" "d" "&x03"
"flag" ""  "&x01"
"flag" "u" "&x05"

[Name Customization]
# Here you can modify the name shown for certain players when using $custom_name$.
# Syntax: "type" "info" "custom name" "[expiration date]"

"name" "OciXCrom" "&x03Oci&x04XC&x03rom"

[Say/Say_Team Formats]
# Here you can specify the chat style for every user or flag.
# Syntax: "type" "info" "say format" "say_team format" "[expiration date]"

"noprefix" "" "format_player" "format_player_team"
"flag" "" "format_admin" "format_admin_team"
Добавена е опция да работи както с плъгина който съм направил за Custom Prefix, така и без него.
Тествай и кажи, дали искаш някакви промени.
crx_chatmanager_top_prefix.zip
(4.59 KiB) Свалено 23 пъти
crx_chatmanager_top_prefix.zip
(4.59 KiB) Свалено 23 пъти
LOYAL TO THE OATH OF OMERTА̀

Зад монитора мъжкари, това не го разбирам..
На живо сте мишкари, това го гарантирам!
Седиш на 30 метра от мен като препариран!
Ако има нещо брат, номерът ми е блокиран..

My GitHub Profile
GitHub

My AMXX Includes Collection
AMXX Include Libraries

My Steam Profile (from SteamDB)
  • Value: 4179€
  • Games owned: 1855
  • Games played: 754 (40%)
  • Hours on record: 4,994.9h

Аватар
cgozzie
Извън линия
Потребител
Потребител
Мнения: 1319
Регистриран на: 13 Окт 2016, 22:10
Местоположение: Варна
Се отблагодари: 245 пъти
Получена благодарност: 43 пъти

Re: Top Prefix Chat

Мнение от cgozzie » 14 Сеп 2023, 10:04

Перфектно работи направих тестове за да проверя дали префиксите излизат,всичко е ок.Остава да тествам и със играчите и дали коректно ще им показват префиксите които съм им задал.Нека мине малко време за да се уверя че всичко е на 100% ок и ще те уведомя тук.Ако нещо реша или се наложи да се промени или добави също ще пиша.Много ти благодаря за помоща да си жив и здрав...
Изображение

Аватар
Siska
Извън линия
Потребител
Потребител
Мнения: 772
Регистриран на: 03 Дек 2019, 22:29
Местоположение: Bedrock
Се отблагодари: 158 пъти
Получена благодарност: 48 пъти
Обратна връзка:

Re: Top Prefix Chat

Мнение от Siska » 18 Сеп 2023, 16:33

При мен топ префикса излиза само, ако играча има добавен "custom" префикс някакъв. Аз ли бъркам нещо или така работи ?
Търсих врага и го открих : това съм аз , трябва да се победя...
Изображение
WWW.CSMEGAGAMING.COM Изображение Изображение Skype : Sisi-1_1

Аватар
cgozzie
Извън линия
Потребител
Потребител
Мнения: 1319
Регистриран на: 13 Окт 2016, 22:10
Местоположение: Варна
Се отблагодари: 245 пъти
Получена благодарност: 43 пъти

Re: Top Prefix Chat

Мнение от cgozzie » 19 Сеп 2023, 00:21

Аз си ги ползвам от ChatManager.ini в "custom" нищо не съм слагал и ми работи супер..
Изображение

Аватар
Siska
Извън линия
Потребител
Потребител
Мнения: 772
Регистриран на: 03 Дек 2019, 22:29
Местоположение: Bedrock
Се отблагодари: 158 пъти
Получена благодарност: 48 пъти
Обратна връзка:

Re: Top Prefix Chat

Мнение от Siska » 19 Сеп 2023, 00:54

Не знам дали ме разбра. Слагам някакъв префикс на играч и тогава имам префикс топ, ако не сложа префикс на даден играч той няма и топ. Преди време попитах как можем да си добавим всички префикси на един ред, но никой не ми отговори. Ако искам да имам вип, топ и "custom" префикс, което означава лично за играча, как да го направя ? Ако искам само едното от всичките или само две ? Абсолютно никъде няма такава информация или поне аз не намирам...
Търсих врага и го открих : това съм аз , трябва да се победя...
Изображение
WWW.CSMEGAGAMING.COM Изображение Изображение Skype : Sisi-1_1

Аватар
cgozzie
Извън линия
Потребител
Потребител
Мнения: 1319
Регистриран на: 13 Окт 2016, 22:10
Местоположение: Варна
Се отблагодари: 245 пъти
Получена благодарност: 43 пъти

Re: Top Prefix Chat

Мнение от cgozzie » 19 Сеп 2023, 09:50

До колкото можах да те разбера ти искаш да вади и 2-ри префикс за да ден играч.Примерно Тор 1 Вип и тук след него още 1 премерно Николай.
[Top 1] [V.I.P] [Николай] нещо такова ли.Ако е така обърни се към Huehue той ще знае как да стане.Аз в моя случай който е в темата исках само това [Top 1] [V.I.P] и ми работи но за още 1 префикс и аз незнам как мисля че тук ще прочетат какво искаш и ще ти помогнат.
Изображение

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

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

Кой е на линия

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