Поиск TOP 15 AWARDS

Shadowless

Пользователь
Регистрация
24 Фев 2019
Сообщения
234
Симпатии
7
Пол
Мужской
lets me check :)
 

Shadowless

Пользователь
Регистрация
24 Фев 2019
Сообщения
234
Симпатии
7
Пол
Мужской

pRanks = register_cvar( "top_ranks", "3" )
pFlags = register_cvar( "top_flags", "i" )

so if all set this cvars... TOP 1 , TOP 2 and TOP 3 will get flag "i" yes?



and why my BBcodes does not work? :( mean on forum[DOUBLEPOST=1557151037][/DOUBLEPOST]/*
* Top Awards 10/22/2012
*
* ѕлагин добавл¤ет флаг(и) TOPx игрокам
* вары:
* top_ranks - максимальный ранг, который может иметь игрок (конец TOPX)
* top_flags - какие флаги добавл¤ютс¤
*
* »гнорируютс¤ игроки с флагом IGNORE_FLAG (по умолчанию это флаг m) и игроки, уже имеющие ¬—≈ добавл¤емые флаги.
* ѕо¤сн¤юща¤ надпись игроку выводитс¤ цветным чатом.
*
* 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>

#define IGNORE_FLAG ADMIN_CHAT /* flag "m" */

new pRanks, pFlags

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

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

ColorPrint( data[0], "%L", data[0], "TOP_AWARDS", data[1] )
}

ColorPrint( iReceiver, const szRawMessage[ ], any:... ) {
static iMsgSayText = 0
if( !iMsgSayText )
iMsgSayText = get_user_msgid( "SayText" )

new szMessage[192]
vformat( szMessage, charsmax(szMessage) - 1, szRawMessage, 3 )
replace_all( szMessage, charsmax(szMessage) - 1, "!n", "^1" )
replace_all( szMessage, charsmax(szMessage) - 1, "!t", "^3" )
replace_all( szMessage, charsmax(szMessage) - 1, "!g", "^4" )
if ( szMessage[0] != '^1' || szMessage[0] != '^3' || szMessage[0] != '^4' )
format( szMessage, charsmax(szMessage) - 1, "^1%s", szMessage ) // we must set initial default color if it is not provided explicitly

message_begin( MSG_ONE_UNRELIABLE, iMsgSayText, _, iReceiver )
write_byte(iReceiver) // use target player as sender to see colors at all (and his own team color for ^3)
write_string(szMessage)
message_end()
}
 

g52

Заблокированные
Пользователь
Регистрация
8 Июн 2018
Сообщения
367
Симпатии
57
Shadowless, If you put top_ranks 10, it will be given to all 10 in the top. BBcodes? BBcodes? Don't know what it is, I'm not a skripter, more search.

Если поставите top_ranks 10, то будет выдаваться всем 10 в топе.
BBcodes? Не знаю, что это, я не скриптер, больше поисковкик.[DOUBLEPOST=1557202835][/DOUBLEPOST]Try (попробуйте) https://dev-cs.ru/resources/389/
 

Shadowless

Пользователь
Регистрация
24 Фев 2019
Сообщения
234
Симпатии
7
Пол
Мужской
this is bbcode

bbcode - Пошук Google:[DOUBLEPOST=1557234457][/DOUBLEPOST]
Shadowless, If you put top_ranks 10, it will be given to all 10 in the top. BBcodes? BBcodes? Don't know what it is, I'm not a skripter, more search.

Если поставите top_ranks 10, то будет выдаваться всем 10 в топе.
BBcodes? Не знаю, что это, я не скриптер, больше поисковкик.[DOUBLEPOST=1557202835][/DOUBLEPOST]Try (попробуйте) https://dev-cs.ru/resources/389/

its award for spend time on server :( i need award for top 1 for exaple on 25 every month, if its posible and without anySQL[DOUBLEPOST=1557234645][/DOUBLEPOST]and where find this? -> // 1 - Simple Online Logger by mx?!
gona test top time award
 
Сверху Снизу