Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

35 страниц V  « 34 35

Склад маленьких плагинов

, только отборная пузатая мелочь
Статус пользователя FOXSAN
сообщение 16.11.2016, 11:11
Сообщение #681


Стаж: 7 лет 11 месяцев
Город: Краснодар

Сообщений: 236
Благодарностей: 13
Полезность: < 0

Algalon,
Спасибо, помогло.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя FOXSAN
сообщение 18.12.2016, 15:27
Сообщение #682


Стаж: 7 лет 11 месяцев
Город: Краснодар

Сообщений: 236
Благодарностей: 13
Полезность: < 0

Добрый день.
Подскажите, как в плагине GHW Auto Message Displayer сделать, что бы сообщения постоянно показывались?
GHW Auto Message Displayer
Код:
/*
* It is NOT original version of 'GHW Auto Message Displayer' plugin
*
* Home post:
* https://c-s.net.ua/forum/index.php?act=find...&pid=631040
*
* Last update:
* 8/22/2013
*/

/*
* _______ _ _ __ __
* | _____/ | | | | \ \ __ / /
* | | | | | | | | / \ | |
* | | | |____| | | |/ __ \| |
* | | ___ | ______ | | / \ |
* | | |_ | | | | | | / \ |
* | | | | | | | | | | | |
* | |____| | | | | | | | | |
* |_______/ |_| |_| \_/ \_/
*
*
*
* Last Edited: 06-21-08
*
* ============
* Changelog:
* ============
*
* v3.1 8/22/2013
* - full refactoring of HUD messages reading
* - some fixes of text messages reading
*
* v3.0 1/2/2013
* - messages are displayed to dead players only
* - ability to use DHUD instead of HUD (commented by default)
* - small fixes to avoid problems when some limits are reached
*
* v2.1
* -Bug Fix
* -Changed String lengths from 128 - 256
*
* v2.0
* -Remake
*
* v1.0
* -Initial Release
*
*/

#define VERSION "3.1b"

#include <amxmodx>
#include <amxmisc>

/*---------------EDIT ME------------------*/
#define NUM_MESSAGES 25
#define USE_DHUD // comment this to use standard HUD messages; it might be enabled for cstrike only
//#define DEBUG // uncomment to get read results into server console
/*----------------------------------------*/

#define LINE_LEN 608 // read lines buffer
#define HUD_LEN 128 // max allowed HUD message length
#define TEXT_LEN 191 // max allowed text message length

#if defined USE_DHUD && AMXX_VERSION_NUM < 183
// AMXX 1.8.3 since git3790 dev build has its own support of DHUD messages
#include <dhudmessage>
#endif

new text_messages[NUM_MESSAGES][TEXT_LEN]
new hud_messages[NUM_MESSAGES][4][HUD_LEN]
new hud_message_colors[NUM_MESSAGES][4][3]
new giMsgSayText

new num_hudmessages, num_textmessages
new cur_hudmessage[33], cur_textmessage[33]
new pHudLen, pTextLen, pHudLoc

public plugin_init() {
register_plugin( "GHW Auto Message Displayer" , VERSION, "GHW_Chronic/Safety1st" )

pHudLen = register_cvar( "advertise_hud_len", "180" )
pTextLen = register_cvar( "advertise_text_len", "60" )
pHudLoc = register_cvar( "advertise_hud_loc", "1" )

set_task( 7.0, "ReadConfig" )
}

public ReadConfig() {
ReadConfigFile()

if ( num_hudmessages )
set_task( get_pcvar_float(pHudLen), "DisplayHudMessage", .flags = "b" )
if ( num_textmessages ) {
set_task( get_pcvar_float(pTextLen), "DisplayTextMessage", .flags = "b" )
giMsgSayText = get_user_msgid("SayText")
}
}

public ReadConfigFile() {
new szConfigFile[192]
get_localinfo( "amxx_configsdir", szConfigFile, 63 )
format( szConfigFile, charsmax(szConfigFile), "%s/messages.ini", szConfigFile )

new Fsize = file_size(szConfigFile, 1 /* return number of lines */ )
new read[LINE_LEN], trash, j, position, startpos, endpos
for(new i=0;i<Fsize;i++)
{
read_file(szConfigFile,i,read,LINE_LEN - 1,trash)
if(containi(read,"Text")==0)
{
i++
if(num_textmessages==NUM_MESSAGES) {
log_amx("Could not add new text message because text message limit is reached; max = %d", NUM_MESSAGES)
continue // do not read any text messages anymore
}
read_file(szConfigFile,i,read,LINE_LEN - 1,trash)
replace_all(read,LINE_LEN - 1,"[blue]","^x03")
replace_all(read,LINE_LEN - 1,"[/blue]","^x01")
replace_all(read,LINE_LEN - 1,"[red]","^x03")
replace_all(read,LINE_LEN - 1,"[/red]","^x01")
replace_all(read,LINE_LEN - 1,"[green]","^x04")
replace_all(read,LINE_LEN - 1,"[/green]","^x01")
replace_all(read,LINE_LEN - 1,"[Blue]","^x03")
replace_all(read,LINE_LEN - 1,"[/Blue]","^x01")
replace_all(read,LINE_LEN - 1,"[Red]","^x03")
replace_all(read,LINE_LEN - 1,"[/Red]","^x01")
replace_all(read,LINE_LEN - 1,"[Green]","^x04")
replace_all(read,LINE_LEN - 1,"[/Green]","^x01")
format(text_messages[num_textmessages],TEXT_LEN - 1,"^x04^x01%s",read)
#if defined DEBUG
server_print( "^nTEXT: %s^n", text_messages[num_textmessages] )
#endif
num_textmessages++
}
else if(containi(read,"Hud")==0)
{
i++
if(num_hudmessages==NUM_MESSAGES) {
log_amx("Could not add new HUD message because HUD message limit is reached; max = %d", NUM_MESSAGES)
continue // do not read any HUD messages anymore
}
read_file(szConfigFile,i,read, LINE_LEN - 1,trash)
j = 0, position = 0
while(position < strlen(read) && j<4)
{
while(!contain(read[position]," ")) position++
if(!containi(read[position],"[blue]"))
{
startpos = position + 6
endpos = containi(read[startpos],"[/blue]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 7
hud_message_colors[num_hudmessages][j][0] = 0
hud_message_colors[num_hudmessages][j][1] = 100
hud_message_colors[num_hudmessages][j][2] = 255
}
else if(!containi(read[position],"[red]"))
{
startpos = position + 5
endpos = containi(read[startpos],"[/red]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 6
hud_message_colors[num_hudmessages][j][0] = 255
hud_message_colors[num_hudmessages][j][1] = 0
hud_message_colors[num_hudmessages][j][2] = 0
}
else if(!containi(read[position],"[green]"))
{
startpos = position + 7
endpos = containi(read[startpos],"[/green]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 8
hud_message_colors[num_hudmessages][j][0] = 0
hud_message_colors[num_hudmessages][j][1] = 255
hud_message_colors[num_hudmessages][j][2] = 0
}
else if(!containi(read[position],"[yellow]"))
{
startpos = position + 8
endpos = containi(read[startpos],"[/yellow]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 9
hud_message_colors[num_hudmessages][j][0] = 255
hud_message_colors[num_hudmessages][j][1] = 255
hud_message_colors[num_hudmessages][j][2] = 0
}
else if(!containi(read[position],"[orange]"))
{
startpos = position + 8
endpos = containi(read[startpos],"[/orange]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 9
hud_message_colors[num_hudmessages][j][0] = 255
hud_message_colors[num_hudmessages][j][1] = 128
hud_message_colors[num_hudmessages][j][2] = 64
}
else if(!containi(read[position],"[pink]"))
{
startpos = position + 6
endpos = containi(read[startpos],"[/pink]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 7
hud_message_colors[num_hudmessages][j][0] = 255
hud_message_colors[num_hudmessages][j][1] = 0
hud_message_colors[num_hudmessages][j][2] = 128
}
else if(!containi(read[position],"[indigo]"))
{
startpos = position + 8
endpos = containi(read[startpos],"[/indigo]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 9
hud_message_colors[num_hudmessages][j][0] = 0
hud_message_colors[num_hudmessages][j][1] = 255
hud_message_colors[num_hudmessages][j][2] = 255
}
else if(!containi(read[position],"[white]"))
{
startpos = position + 7
endpos = containi(read[startpos],"[/white]")
if(endpos == -1) {
#if defined DEBUG
server_print( "^nHUD problem - can't find closing tag: %s^n", read[startpos] )
#endif
break
}
endpos += startpos
position = endpos + 8
hud_message_colors[num_hudmessages][j][0] = 255
hud_message_colors[num_hudmessages][j][1] = 255
hud_message_colors[num_hudmessages][j][2] = 255
}
else{
startpos = position
endpos = containi(read[startpos],"[") // may be where are next pair of tags?
if(endpos == -1) {
// no, there are not ;)
endpos = LINE_LEN
position = LINE_LEN
}
else {
endpos += startpos
position = endpos
}
hud_message_colors[num_hudmessages][j][0] = 255
hud_message_colors[num_hudmessages][j][1] = 255
hud_message_colors[num_hudmessages][j][2] = 255
}

copy(hud_messages[num_hudmessages][j], min(HUD_LEN - 1,endpos - startpos), read[startpos])
#if defined DEBUG
server_print( "^nHUD: %s^n", hud_messages[num_hudmessages][j] )
#endif
j++
}
num_hudmessages++
}
}
}

public DisplayHudMessage() {
new Float:loc[3]
switch (get_pcvar_num(pHudLoc) ) {
case 2: {
loc[0] = 0.57
loc[1] = 0.60
}
default: {
loc[0] = -1.0
#if defined USE_DHUD
loc[1] = 0.14
#else
loc[1] = 0.19
#endif
}
}

new iPlayers[32], iPlayersNum, iPlayer
get_players( iPlayers, iPlayersNum, "bch" ) // display messages to dead players only
for ( new i = 0; i < iPlayersNum; i++ ) {
iPlayer = iPlayers[i]
loc[2] = loc[1] // reset Y position
for ( new j = 0; j < 4; j++ ) {
if ( hud_messages[cur_hudmessage[iPlayer]][j][0] ) {
#if defined USE_DHUD
set_dhudmessage( hud_message_colors[cur_hudmessage[iPlayer]][j][0],hud_message_colors[cur_hudmess
age[iPlayer]][j][1],hud_message_colors[cur_hudmessage[iPlayer]][j][2],loc[0],loc[
2], 0, 6.0, 12.0,0.1,0.2 )
show_dhudmessage( iPlayer, hud_messages[cur_hudmessage[iPlayer]][j] )
loc[2] += 0.03
#else
set_hudmessage( hud_message_colors[cur_hudmessage[iPlayer]][j][0],hud_message_colors[cur_hudmess
age[iPlayer]][j][1],hud_message_colors[cur_hudmessage[iPlayer]][j][2],loc[0],loc[
2], 0, 6.0, 12.0,0.1,0.2,-1 )
show_hudmessage( iPlayer, hud_messages[cur_hudmessage[iPlayer]][j] )
loc[2] += 0.02
#endif
}
}
cur_hudmessage[iPlayer] = ++cur_hudmessage[iPlayer] % num_hudmessages
}
}

public DisplayTextMessage() {
new iPlayers[32], iPlayersNum, iPlayer
get_players( iPlayers, iPlayersNum, "bch" ) // display messages to dead players only
for ( new i = 0; i < iPlayersNum; i++ ) {
iPlayer = iPlayers[i]

message_begin( MSG_ONE_UNRELIABLE, giMsgSayText, _, iPlayer )
write_byte(iPlayer)
write_string( text_messages[cur_textmessage[iPlayer]] )
message_end()

cur_textmessage[iPlayer] = ++cur_textmessage[iPlayer] % num_textmessages
}
}

Содержимое messages.ini:
messages.ini
Hud
[Green]В группе сервера[/Green][Blue]www.***[/Blue][Green]Проводится конкурс на выдачу[/Green][Orange]VIP[/Orange]

Заранее спасибо
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя pogorelovios
сообщение 7.1.2017, 15:04
Сообщение #683


Стаж: 7 лет 7 месяцев

Сообщений: 130
Благодарностей: 4
Полезность: 33

Тестил кто нибудь плагин instant_autoteambalance без появления Auto-Team Balance next round? Были кики с причиной "Reliable channel overflowed"?
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя DexteR
сообщение 11.2.2017, 23:04
Сообщение #684


Стаж: 8 лет 5 месяцев

Сообщений: 633
Благодарностей: 98
Полезность: 165

Автор: Safety1st
Версия: 1.7

Чего нового:
• рандомный цвет HUD'а;
• многоязыковая поддержка (ML);
• поддержка правильных окончаний слов.
Прикрепленные файлы:
Прикрепленный файл  Nice_Killer_v1.7.rar ( 2,48 килобайт ) Кол-во скачиваний: 65
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя AsPiRaNt
сообщение 6.2.2018, 21:40
Сообщение #685


Стаж: 6 лет 5 месяцев
Город: Ростов

Сообщений: 384
Благодарности: выкл.

https://c-s.net.ua/forum/topic54004s260.htm...mp;#entry631040


Плагин не работает почему?
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя Lady
сообщение 6.6.2019, 13:22
Сообщение #686


Стаж: 5 лет 7 месяцев

Сообщений: 430
Благодарностей: 39
Полезность: 96

ребята плагин top_awards то выдает то не выдает флаги игрокам, настроено на топ-3, но у 2го нету флагов, зато у 6го они есть... как исправить такой баг?
Cкрытый текст
Cкрытый текст
/*
* Top Awards 10/22/2012
*
* Плагин добавляет флаг(и) TOPx игрокам
* Квары:
* top_ranks - максимальный ранг, который может иметь игрок (конец TOPX)
* top_flags - какие флаги добавляются
*
* Игнорируются игроки с флагом IGNORE_FLAG (по умолчанию это флаг m) и игроки, уже имеющие ВСЕ добавляемые флаги.
* Поясняющая надпись игроку выводится HUD'ом рандомного цвета.
*
* Credits:
* - original plugin's authors SimonLogic & RoleX
* - c-s.net.ua users 3aB}{o3 & cs-portal for the idea and link
*/

#include <amxmodx>
#include <csstats>
#include <dhudmessage>

#define IGNORE_FLAG ADMIN_LEVEL_A /* flag "b" */

new pRanks, pFlags

public plugin_init() {
register_plugin( "Top Awards", "0.11h", "Safety1st" )
register_dictionary( "topawards.txt" )
pRanks = register_cvar( "top_ranks", "3" )
pFlags = register_cvar( "top_flags", "abn" )
}

public client_putinserver(id) {
set_task( 0.3, "CheckStats", id ) // we need to use delay otherwise we will get rank = 0
}

public CheckStats(id) {
new iFlags = get_user_flags(id)
new szAddFlags[16]
get_pcvar_string( pFlags, szAddFlags, 15 )
new iAddFlags = read_flags(szAddFlags)

if ( iFlags & IGNORE_FLAG || iFlags & iAddFlags == iAddFlags )
// ignore player with IGNORE_FLAG or having all additional flags
return

new iRanks = get_pcvar_num(pRanks)
if ( !iRanks )
return

new szStats[8], szBodyHits[8]
new iRank = get_user_stats( id, szStats, szBodyHits )

if ( iRank && iRank <= iRanks ) {
// 1st check for safety. may be player not ranked at all yet
set_user_flags( id, iFlags | iAddFlags )
new data[2]
data[0] = id
data[1] = iRanks
set_task( 5.0, "PrintMessage", _, data, 2 )
}
}

public PrintMessage( data[2] ) {
if ( !is_user_connected(data[0]) )
return

set_dhudmessage( random(200) + 25, random(200) + 25, random(200) + 25, -1.0, 0.75, 0, .fxtime = 2.0, .holdtime = 10.0 )
show_dhudmessage( data[0], "%L", data[0], "TOP_AWARDS", data[1] )
}
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Safety1st
сообщение 28.12.2019, 3:10
Сообщение #687
Стаж: 12 лет
Город: Moscow

Сообщений: 7228
Благодарностей: 8071
Полезность: 196

Simple Task Exec

Plugin executes a predefined set of actions at specified times per day. It was made to demonstrate how to run a task at any given time. Because code monkeys instead check time and compare it on regular basis, such crap I see everywhere.

There is sst_times command to set times, the order and delimiters could be different, but with colons you must use quotation marks:
Код
sst_times "23:00:00" 11-0-0 0/34/59
sst_times "15:0:0" 6-0-05 17k00j0
sst_times "05:00:00"
Only one command must be added to config file which is executed every time a map starts, like amxx.cfg.

Set of actions are customized in ExecCmds() function, set here whatever you want. As a sample I added map voting. If you want map changing to be forced with standard 'Admin Votes' AMXX plugin, find if (iResult < iRatio) line in adminvote.sma and change it to if (g_voteCaller && iResult < iRatio).

v0.1 11/23/2019 Прикрепленный файл  simple_task_exec.sma ( 2,95 килобайт ) Кол-во скачиваний: 24


Отредактировал: Safety1st, - 28.12.2019, 3:13
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 3 раз
   + Цитировать сообщение
Safety1st
сообщение 28.12.2019, 3:17
Сообщение #688
Стаж: 12 лет
Город: Moscow

Сообщений: 7228
Благодарностей: 8071
Полезность: 196

New Year 2020 Task



Плагин время от времени и по чат-команде /newyear показывает всем в чате, сколько времени осталось до Нового Года. И в момент наступления НГ выполнит то, что задано в функции NewYear(). Предполагается, что каждый поставит туда то, что ему нужно ;)

Часовой пояс сервера задаётся в исходнике в строке const TIMEZONE, по умолчанию стоит MSK (UTC+3). Частота регулярных объявлений настраивается в строке #define MSG_FREQUENCY; чтобы их отключить, закомментируйте её.

v0.7 от 14.12.2017 г.
Прикрепленный файл  new_year_task.txt ( 704 байт ) Кол-во скачиваний: 26
Прикрепленный файл  new_year_task.sma ( 4,37 килобайт ) Кол-во скачиваний: 32


Отредактировал: Safety1st, - 28.12.2019, 3:27
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 3 раз
   + Цитировать сообщение
Статус пользователя Akilano
сообщение 31.10.2020, 22:40
Сообщение #689
Стаж: 3 года 4 месяца

Сообщений: 0
Благодарностей: 1
Полезность: 0

Safety1st,
Доброго времени суток. Спасибо за потрясающие работы.
Скажите пожалуйста вы пишите плагины на заказ ? У меня есть свой фан сервер и я ищу возможности его более улучшить.
Суть плагина в универсальном солдате или уникальном.
Игрок/Bot при определенном флаге (допустим "a") имел пассивные особенности дающие преимущество.
Одни из них: 1) Здоровье при старте выше (150), пассивная регенерация (7/1 сек) уменьшение входящего урона (80%)
Оплата можно заранее, а потом сам плагин. Только уточнить по цене и куда.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя ThePhoenix
сообщение 31.10.2020, 23:22
Сообщение #690


Стаж: 9 лет 3 месяца

Сообщений: 2723
Благодарностей: 533
Полезность: 40

Akilano, он как бы заблокирован на форуме, если что, он тебе ответить не сможет)) Да и вряд ли увидит.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
HipHop
сообщение 1.11.2020, 1:47
Сообщение #691
Стаж: 3 года 5 месяцев
Город: Moscow

Сообщений: 185
Благодарностей: 139
Полезность: 828

Akilano, на заказ не пишу, увы. Любой быдлокодер с радостью тебе поможет, можно начать с ThePhoenix, steelzzz, $@NyA и его подельника smile.gif
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
Статус пользователя steelzzz
сообщение 1.11.2020, 9:27
Сообщение #692


Стаж: 10 лет

Сообщений: 609
Благодарностей: 187
Полезность: 167

Шиза сафа все еще не прошла хыхыхы


Нужна помощь в настройке сервера или плагина? (Платно) -> Тык
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя csnet
сообщение 1.11.2020, 22:35
Сообщение #693
Стаж: 10 лет

Сообщений: 4755
Благодарностей: 3837
Полезность: 693

Одни из них: 1) Здоровье при старте выше (150), пассивная регенерация (7/1 сек) уменьшение входящего урона (80%)

это умеет любой начинающий, регаешь ham-spawn даешь хп, ставишь задачку на реген при хп ниже или выше требуемого.
уменьшение урона снова в ham есть и примеров в инете просто жуй и выплевывай.


go v cs:go
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
HipHop
сообщение 1.11.2020, 22:42
Сообщение #694
Стаж: 3 года 5 месяцев
Город: Moscow

Сообщений: 185
Благодарностей: 139
Полезность: 828

csnet, а сделай не как все 4fun: заюзай entity, которая будет хилить всех достойных автоматом, без тасков smile.gif Такой плагин есть, в ЛС скину линк, если решить заняться derisive.gif И в плане аптечек можно отличиться, чтобы игрок сам мог восстанавливать здоровье до максимума good.gif Такое на просторах инета не валяется

Отредактировал: HipHop, - 1.11.2020, 22:43
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
35 страниц V  « 34 35
 
Ответить в данную темуНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: