Помогите в чём проблема почему hud так криво показывает?
screen
sma
Код:
#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" )
public DisplayHudMessage() { new Float:loc[3] switch (get_pcvar_num(pHudLoc) ) { case 2: { loc[0] = -1.0 loc[1] = -1.0 } 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, "ch" ) // 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, "ch" ) // display messages to dead players only for ( new i = 0; i < iPlayersNum; i++ ) { iPlayer = iPlayers[i]
Subb98, Как наказание можно сделать так: Наказанного игрока переносит в спектры и он не сможет зайти пока раунд не закончится или как закончится ему бы выходило msg! Типо: Ваше наказание закончено вы можете войти в игру! За повторное нарушение можно наказывать на 2,3,4,5 раундов и т.д. Получается что система наказывает по раундам в этом случае если раундтайм на паблике 2 минуты то получается 2,4,6,8,10 минут наказания в этом случае нужно сделать так что-бы игрок когда в наказании не смог заходить в игру методом рестарта реконекта ! ИМХО
Как быть с этим: допустим наказал игрока на 3 минуты и он стоит все его напарники умерли и он остался один так и будет стоять пока раундтайм не закончился?
/** * Modified by Safety1st * 6/3/2014 * * Changes are: * • added EXCLUDE_FLAGS option; * • proposed fix to always get the prise menu; * • fix for buy menu overlapping; * • added warning sound to attract 'best player' attention; * • prise menu is shown only during 15 seconds; * • removed max money amount limiting * • fixed bug with array size for players (thanks to ExTPuMaJI) * • a few minor optimizations. */
// customizable parameters #define MAX_PLAYERS 32 // Максимальное кол-во игроков на сервере, заменить своим (по умолчанию 32) #define MIN_PLAYERS 2 // Минимальное кол-во игроков, присутствующих на сервере, необходимое для работы плагина (по умолчанию 2) #define ROUND_NUM 3 // Порядковый номер раунда от момента начала игры, с которого плагин будет работать (по умолчанию 3) //#define EXCLUDE_FLAGS ADMIN_IMMUNITY // uncomment to exclude players with certain flags; by default it is flag 'a' // end of customizable parameters
#pragma semicolon 1
#if AMXX_VERSION_NUM < 183 #define MENU_FIX // fix for AMXX menus, more info here: #include <fakemeta> const m_iMenu = 205; // cbaseplayer offset #endif
new g_iPlayerFrags[MAX_PLAYERS + 1]; new g_iPlayerDamage[MAX_PLAYERS + 1]; new g_iPlayers[32]; new g_iPlayersNum; new g_szBestPlayerName[32]; new g_iBestPlayer; new g_iRandomPrise; new g_iRoundCounter; new g_iResetSize;
public plugin_init() { register_plugin("Best Player", "0.2b", "Subb98");
public plugin_cfg() { new const szDisableMapTypes[][] = {"35hp_", "ka_", "awp_"}; // Типы карт, на которых плагин не будет работать new szMapname[32]; get_mapname(szMapname, charsmax(szMapname)); for(new i; i < sizeof szDisableMapTypes; i++) if(equali(szMapname, szDisableMapTypes[i], strlen(szDisableMapTypes[i]))) pause("ad"); }
public EventNewRound() { g_iRoundCounter++; Reset(); }
// in case there are some players with the same frags count for( i = 1; i < iCount; i++ ) { id = g_iPlayers[i]; if(g_iPlayerDamage[id] > g_iPlayerDamage[g_iBestPlayer]) g_iBestPlayer = id; }
if(g_iBestPlayer) { get_user_name(g_iBestPlayer, g_szBestPlayerName, charsmax(g_szBestPlayerName)); ColorChat(0, DontChange, "^4[^3BP^4] Лучшим за раунд стал ^3%s, ^4он будет награждён", g_szBestPlayerName); } }
public Fwd_HamPlayerSpawn_Post(id) { if( !is_user_alive(id) || id != g_iBestPlayer ) return;
public HandleMenu(const id, const iKey) { switch(iKey) { case 0: GiveRandomPrise(id); case 1: ColorChat(0, DontChange, "^4[^3BP^4] Игрок ^3%s ^4отказался от ^3приза", g_szBestPlayerName); } }
GiveRandomPrise(const id) { switch(g_iRandomPrise) { case 0: GiveRandomWeapon(id); case 1: { give_item(id, "weapon_hegrenade"); give_item(id, "weapon_flashbang"); give_item(id, "weapon_smokegrenade"); cs_set_user_bpammo(id, CSW_FLASHBANG, 2); ColorChat(0, DontChange, "^4[^3BP^4] Игрок ^3%s ^4получил приз - ^3набор гранат", g_szBestPlayerName); } case 2: { cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM); ColorChat(0, DontChange, "^4[^3BP^4] Игрок ^3%s ^4получил приз - ^3бронежилет и шлем", g_szBestPlayerName); } } }
GiveRandomWeapon(const id) { new iNum = random_num(0, charsmax(g_Data)); DropWeapon(id, iNum); give_item(id, g_Data[iNum][Data_Item]); cs_set_user_bpammo(id, g_Data[iNum][Data_Index], g_Data[iNum][Data_Ammo]); ColorChat(0, DontChange, "^4[^3BP^4] Игрок ^3%s ^4получил приз - ^3%s", g_szBestPlayerName, g_Data[iNum][Data_Name]); }
Прошу администрацию данного форума если есть возможность разбанить trollface единственный добрый человек (есть ещё но не помню их) человек который оживлял данный форум своими работами. Отзывчивый понимающий!
Больше не знаю что писать про него одним словом хороший чел!
Человек столько добра сделал людям чего стоит его тема в My plugins а ты Esecman что тут сделал для народа в любой подходящем моменте пишешь в ЛС сделаю за $