RU
RU
UA
EN
PL
ГЛАВНАЯ
УСЛУГИ
ПЛАГИНЫ
КАРТЫ
REBUY
SCANMON
CASSA
SALE
ФОРУМ
МОНИТОР
HELP
КОНТАКТ
Главная
/
Plugins
/
Team Grenade Trail V 1.2
Плагин не прошел проверку:
такой есть
Создайте новую запись с устранением ошибок
Team Grenade Trail V 1.2
Теги:
Скачать плагины cs
Эффекты
Не звичайний трейсер з під гранати
Компилятор: 1.9.0
233
Команды:
Кваров и команд нет
.sma / .sp
// ----------------------------------------- CONFIG START ----------------------------------------- // If you are having problems, that not everyone who should see the trail is seeing them, that can // be due to message type and ping. Using "MSG_ONE_UNRELIABLE" and "MSG_BROADCAST" is better for server // stability, however using "MSG_ONE" and "MSG_ALL" garanties that client will recieve the update. #define MSG_TYPE_ALONE MSG_ONE // default: (uncommented) //#define MSG_TYPE_ALONE MSG_ONE_UNRELIABLE // default: (commented) #define MSG_TYPE_ALL MSG_ALL // default: (uncommented) //#define MSG_TYPE_ALL MSG_BROADCAST // default: (commented) // ------------------------------------------ CONFIG END ------------------------------------------ #include
#include
#include
#define PLUGIN_NAME "Team Grenade Trail" #define PLUGIN_VERSION "1.2" #define PLUGIN_AUTHOR "Pricolist" #define SetPlayerBit(%1,%2) ( %1 |= ( 1 << ( %2 & 31 ) ) ) #define ClearPlayerBit(%1,%2) ( %1 &= ~( 1 << ( %2 & 31 ) ) ) #define CheckPlayerBit(%1,%2) ( %1 & ( 1 << ( %2 & 31 ) ) ) new g_iCvar_ColorFlash; new g_iCvar_ColorHe; new g_iCvar_ColorSmoke; new g_iCvar_TrailStatus; new g_iCvar_TeamColor; new g_iSpriteLine; new g_iSpriteArrow; new g_iConnectedUsers; new g_iDeadUsers; new g_iMaxPlayers; public plugin_precache() { g_iSpriteArrow = precache_model("sprites/arrow1.spr"); g_iSpriteLine = precache_model("sprites/smoke.spr"); } public plugin_init() { register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR); g_iCvar_TrailStatus = register_cvar("amx_grentrail_status", "1"); g_iCvar_ColorFlash = register_cvar("amx_grentrail_color_fb", "000255255"); g_iCvar_ColorHe = register_cvar("amx_grentrail_color_he", "255063000"); g_iCvar_ColorSmoke = register_cvar("amx_grentrail_color_sg", "031255127"); g_iCvar_TeamColor = register_cvar("amx_grentrail_team_color", "0"); register_event("ResetHUD", "Event_ResetHUD", "be"); register_event("Health", "Event_Health", "bd"); g_iMaxPlayers = clamp(get_maxplayers(), 1, 32); } public client_connect(iPlrId) { ClearPlayerBit(g_iConnectedUsers, iPlrId); ClearPlayerBit(g_iDeadUsers, iPlrId); } public client_putinserver(iPlrId) { if( !is_user_bot(iPlrId) ) { SetPlayerBit(g_iConnectedUsers, iPlrId); if( is_user_alive(iPlrId) ) ClearPlayerBit(g_iDeadUsers, iPlrId); else SetPlayerBit(g_iDeadUsers, iPlrId); } } public client_disconnect(iPlrId) { ClearPlayerBit(g_iConnectedUsers, iPlrId); ClearPlayerBit(g_iDeadUsers, iPlrId); } public Event_ResetHUD(iPlrId) { if( CheckPlayerBit(g_iConnectedUsers, iPlrId) ) { if( is_user_alive(iPlrId) ) ClearPlayerBit(g_iDeadUsers, iPlrId); else SetPlayerBit(g_iDeadUsers, iPlrId); } } public Event_Health(iPlrId) { if( CheckPlayerBit(g_iConnectedUsers, iPlrId) ) { if( is_user_alive(iPlrId) ) ClearPlayerBit(g_iDeadUsers, iPlrId); else SetPlayerBit(g_iDeadUsers, iPlrId); } } public plugin_unpause() { g_iConnectedUsers = 0; g_iDeadUsers = 0; for( new iPlrId=1; iPlrId<=g_iMaxPlayers; iPlrId++ ) { if( is_user_connected(iPlrId) ) { if( !is_user_bot(iPlrId) ) { SetPlayerBit(g_iConnectedUsers, iPlrId); if( !is_user_alive(iPlrId) ) SetPlayerBit(g_iDeadUsers, iPlrId); } } } } public grenade_throw(iPlrId, iGrenId, iWeaponType) { new iTemp; switch( iWeaponType ) { case CSW_FLASHBANG: iTemp = get_pcvar_num(g_iCvar_ColorFlash); case CSW_HEGRENADE: iTemp = get_pcvar_num(g_iCvar_ColorHe); case CSW_SMOKEGRENADE: iTemp = get_pcvar_num(g_iCvar_ColorSmoke); default: return; } new iRed = iTemp/1000000; iTemp %= 1000000; new iGreen = iTemp/1000; new iBlue = iTemp%1000; iTemp = clamp(get_pcvar_num(g_iCvar_TeamColor), 0, 1); switch( clamp(get_pcvar_num(g_iCvar_TrailStatus), 0, 3) ) { case 1: { new CsTeams:iOwnerTeam = cs_get_user_team(iPlrId); for( new iPlayer=1; iPlayer<=g_iMaxPlayers; iPlayer++ ) { if( CheckPlayerBit(g_iConnectedUsers, iPlayer) ) { if( cs_get_user_team(iPlayer)==iOwnerTeam ) { message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer); write_byte(TE_BEAMFOLLOW); write_short(iGrenId); write_short(g_iSpriteArrow); write_byte(15); write_byte(7); write_byte(iRed); write_byte(iGreen); write_byte(iBlue); write_byte(191); message_end(); if( iTemp ) { message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer); write_byte(TE_BEAMFOLLOW); write_short(iGrenId); write_short(g_iSpriteLine); write_byte(15); write_byte(1); switch( iOwnerTeam ) { case CS_TEAM_T: { write_byte(255); write_byte(0); write_byte(0); } case CS_TEAM_CT: { write_byte(0); write_byte(0); write_byte(255); } default: { write_byte(127); write_byte(127); write_byte(127); } } write_byte(191); message_end(); } } } } } case 2: { new CsTeams:iOwnerTeam = cs_get_user_team(iPlrId); for( new iPlayer=1; iPlayer<=g_iMaxPlayers; iPlayer++ ) { if( CheckPlayerBit(g_iConnectedUsers, iPlayer) ) { if( CheckPlayerBit(g_iDeadUsers, iPlayer) || cs_get_user_team(iPlayer)==iOwnerTeam ) { message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer); write_byte(TE_BEAMFOLLOW); write_short(iGrenId); write_short(g_iSpriteArrow); write_byte(15); write_byte(7); write_byte(iRed); write_byte(iGreen); write_byte(iBlue); write_byte(191); message_end(); if( iTemp ) { message_begin(MSG_TYPE_ALONE, SVC_TEMPENTITY, _, iPlayer); write_byte(TE_BEAMFOLLOW); write_short(iGrenId); write_short(g_iSpriteLine); write_byte(15); write_byte(1); switch( iOwnerTeam ) { case CS_TEAM_T: { write_byte(255); write_byte(0); write_byte(0); } case CS_TEAM_CT: { write_byte(0); write_byte(0); write_byte(255); } default: { write_byte(127); write_byte(127); write_byte(127); } } write_byte(191); message_end(); } } } } } case 3: { message_begin(MSG_TYPE_ALL, SVC_TEMPENTITY); write_byte(TE_BEAMFOLLOW); write_short(iGrenId); write_short(g_iSpriteArrow); write_byte(15); write_byte(7); write_byte(iRed); write_byte(iGreen); write_byte(iBlue); write_byte(191); message_end(); if( iTemp ) { message_begin(MSG_TYPE_ALL, SVC_TEMPENTITY); write_byte(TE_BEAMFOLLOW); write_short(iGrenId); write_short(g_iSpriteLine); write_byte(15); write_byte(1); switch( cs_get_user_team(iPlrId) ) { case CS_TEAM_T: { write_byte(255); write_byte(0); write_byte(0); } case CS_TEAM_CT: { write_byte(0); write_byte(0); write_byte(255); } default: { write_byte(127); write_byte(127); write_byte(127); } } write_byte(191); message_end(); } } } }
Отправить
Загрузил
GlowN
2024-03-19 22:55:32
0
63
Установить на сервер
Скачать
Нет оплаченых серверов
Купить сервер CS 1.6
Купить сервер CS:GO
Купить сервер CSS v34
Подключить свой VDS к панели
[UA] БРАТСЬКИЙ НАРОД [18+]
91.211.118.49:27040
Данная иконка означает, что плагин был проверен администрацией хостинга на тестовом сервере, и проблем с ним не было выявлено. Рекомендуем ставить исключительно проверенные плагины.
Плагин загружен на сервер, но проверка еще не была проведена.
CSHOST.COM.UA 2012-2024 Хостинг игровых серверов