Пользователь
- Сообщения
- 33
- Реакции
- 0
- Ошибка
-
Плагин стим бонусов , плохо работает , работает только первые 2-3 раунда (выдаёт бонусы) потом нет бонусов , помогите разобраться пожалуйста
помогите сделать с 3 раунда и что бы каждый раунд выдавались бонусы стим игрокам
- ОС
- Linux
- Билд
-
REHLDS
- ReGamedll
-
5.3.0.222
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unlod
[ 1] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 2] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-R ini Start ANY
[ 3] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 4] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 5] Rechecker RUN - rechecker_mm_i38 v2.4 ini Chlvl ANY
[ 6] ProcessCmds RUN - processcmds_mm_i v1.1.3 ini Start Never
[ 7] Fun RUN - fun_amxx_i386.so v1.8.3-d pl2 ANY ANY
[ 8] Engine RUN - engine_amxx_i386 v1.8.3-d pl2 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-d pl2 ANY ANY
[10] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-d pl2 ANY ANY
[11] CStrike RUN - cstrike_amxx_i38 v1.8.3-R pl2 ANY ANY
[12] ReAPI RUN - reapi_amxx_i386. v5.2.0.1 pl2 ANY Never
[13] CSX RUN - csx_amxx_i386.so v1.8.3-R pl2 ANY ANY
[14] MySQL RUN - mysql_amxx_i386. v1.8.3-d pl2 ANY ANY
14 plugins, 14 running
- Список плагинов
-
amx_plugins
Currently loaded plugins:
name version author file status
[ 1] [182] AMXBans RBS 17.10.30 Larte Team & SKA amxbans_rbs.amx running
[ 2] Admin Commands 1.8.3 AMXX Dev Team admincmd.amxx running
[ 3] Slots Reservation 1.8.3 AMXX Dev Team adminslots.amxx running
[ 4] Multi-Lingual System 1.8.3 AMXX Dev Team multilingual.am running
[ 5] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 6] Players Menu 1.7 neugomon players_menu.am running
[ 7] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 8] Plugin Menu 1.8.3 AMXX Dev Team pluginmenu.amxx running
[ 9] Admin Chat 1.8.3 AMXX Dev Team adminchat.amxx running
[ 10] Anti Flood 1.8.3 AMXX Dev Team antiflood.amxx running
[ 11] Admin Votes 1.8.3 AMXX Dev Team adminvote.amxx running
[ 12] TimeLeft 1.8.3-Re AMXX Dev Team timeleft.amxx running
[ 13] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx running
[ 14] Pause Plugins 1.8.3 AMXX Dev Team pausecfg.amxx running
[ 15] Stats Configuration 15.07.15 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 16] StatsX RBS 15.07.24 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 17] Steam Bonus 1.2.1b by damir4ik.n steam.amxx running
[ 18] [ReAPI] VIPka 1.3.9 neygomon, Dager* re_vipka.amxx running
[ 19] Golden AK-47 & M4A1 1.2a neygomon golden_ak_and_m running
[ 20] NameChangeTime 0.0.1 Vaqtincha block_change_ni running
[ 21] RealWorld 2.4 Authors real_world.amxx running
[ 22] [ReAPI] No Reset MOney 0.0.5 Vaqtincha Reset_money.amx running
[ 23] [183] Army Ranks Ultim 17.10.30 SKAJIbnEJIb army_ranks_ulti running
[ 24] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 25] [182] Chat RBS 17.10.30 SKAJIbnEJIb chat_rbs.amxx running
[ 26] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 27] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 28] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 29] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 30] [183] AC Spectator ESP 17.08.09 SKAJIbnEJIb & Ko ac_esp.amxx running
[ 31] [ReAPI] AWPoff 1.2 PAffAEJIkA :3 awp_off.amxx running
[ 32] [183] AR Vampire 17.08.22 SKAJIbnEJIb ar_vampire.amxx running
[ 33] Menus Front-End 1.5 untest neugomon menufront_enda. running
[ 34] Lite MapChooser 2.6 neygomon mapchooserPubli running
[ 35] Warmup 1.6 neugomon warmup.amxx running
[ 36] Weapon Admin Menu 0.1 Nesquik weaponmenu.amxx running
[ 37] Weapon Icon 1.2 hoboman313/Zenix weapon_icon.amx running
[ 38] Win Messages 1.0 neygomon win_messages.am running
[ 39] Ping Control 1.31 neygomon Ping_Control.am running
[ 40] Player Votes 1.0 neugomon player_votes.am running
[ 41] New Plugin 1.0 Stimul No_damage.amxx running
[ 42] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
[ 43] VIP RBS 15.07.18 SKAJIbnEJIb vip_rbs.amxx running
[ 44] CsStats MySQL 15.07.15 SKAJIbnEJIb csstats_mysql.a running
[ 45] [ReAPI] Lite TeamBalan 2.3 neugomon lite_balancer_2 running
[ 46] Descriptive 'Fire in t 0.1 VEN GrenadeInfo.amx running
[ 47] Bomb Count Down HUD/Vo 0.2 RuS Mawe4ka117 bomb_hud.amxx running
[ 48] Custom Models 1.3.2 neugomon custom_models.a running
[ 49] Silly C4 1.1 Cheap_Suit sillyc4.amxx running
[ 50] Screen Player 15.09.25 SKAJIbnEJIb screen_player.a running
[ 51] CS Shop 1.1b neygomon & edite cs_shop.amxx running
[ 52] Top Award RBS 15.07.15 SKAJIbnEJIb topaward_rbs.am running
[ 53] Time for info 1.0 neugomon time_for_info.a running
[ 54] Money HUD Effect 1.15 Sh!nE / Safety1s money_hud_effec running
[ 55] unknown unknown unknown gamename_change running
[ 56] HUD Message 1.5 neygomon hud_message.amx running
[ 57] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 58] SpecList 1.4 pUzzlik spectlist.amxx running
[ 59] Mode 2x2 2.5re s1lent mode.amxx running
59 plugins, 59 running
- Исходный код
-
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <dhudmessage>
#include <colorchat>
#include <fakemeta_util>
#define PLUGIN "Steam Bonus"
#define VERSION "1.2.1b"
#define AUTHOR "by damir4ik.n"
#define PREFIX "STEAM"
#define get_bit(%1,%2) (%1 & (1 << (%2 & 31)))
#define set_bit(%1,%2) (%1 |= (1 << (%2 & 31)))
#define reset_bit(%1,%2) (%1 &= ~(1 << (%2 & 31)))
#define IGNORE_FLAGS "a"
// Цвет DHUD сообщения
#define COLOR_RED random(255) // Количество красного цвета
#define COLOR_GREEN random(25) // Количество зелёного цвета
#define COLOR_BLUE random(255) // Количество синего цвета
#define TIME 5.0 // Время показа
new g_bIsConnected;
new g_bIsSteam;
new g_bProcedure;
new g_RoundCount;
new pistols[6] = {CSW_USP, CSW_GLOCK18, CSW_ELITE, CSW_FIVESEVEN, CSW_P228, CSW_DEAGLE} //
public plugin_init()
{
new sPref[][] = {"awp_", "aim_", "35hp", "fy_"};
new map[32]; get_mapname(map, charsmax(map));
for(new i; i < sizeof sPref; i++)
{
if(containi(map, sPref[i]) != -1)
{
pause("ad");
return;
}
}
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHam(Ham_CS_RoundRespawn, "player", "fw_CS_RoundRespawn_Post", true);
register_logevent("Round_End", 2, "1=Round_End");
}
public Round_End(){
g_RoundCount++;
}
public client_putinserver(id)
{
set_bit(g_bIsConnected, id);
if(is_user_steam(id))
{
set_bit(g_bIsSteam, id);
reset_bit(g_bProcedure, id);
set_task(3.0, "WelcomeMessage", id);
}
else
reset_bit(g_bIsSteam, id);
}
public client_disconnect(id)
reset_bit(g_bIsConnected, id);
public WelcomeMessage(id)
{
if(get_bit(g_bIsConnected, id))
{
static szName[32];
get_user_name(id, szName, charsmax(szName));
set_dhudmessage(COLOR_RED, COLOR_GREEN, COLOR_BLUE, -1.0, 0.5, 0, 0.0, TIME);
show_dhudmessage(id, "Привет, %s!", szName);
set_dhudmessage(COLOR_RED, COLOR_GREEN, COLOR_BLUE, -1.0, 0.55, 0, 0.0, TIME);
show_dhudmessage(id, "У Вас Steam, поэтому каждый раунд Вы будете получать бонусы");
}
}
public fw_CS_RoundRespawn_Post(id)
{
new ignore_flags = read_flags(IGNORE_FLAGS);
if(get_user_flags(id) & ignore_flags == ignore_flags)
return;
if(get_bit(g_bIsConnected, id) && get_bit(g_bIsSteam, id) && g_RoundCount > 2)
{
if(!get_bit(g_bProcedure, id))
{
new player_name[32];
get_user_name(id, player_name, charsmax(player_name));
ColorChat(0, RED, "^1[^4%s^1] ^3%s ^4получил бонус за стим.", PREFIX, player_name);
switch(random_num(0, 4))
{
case 0:
{
new TmpMoney = random_num(100, 3000);
cs_set_user_money(id, cs_get_user_money(id) + TmpMoney, 1);
ColorChat(id, RED, "^1[^4%s^1] ^3Бонус за steam : ^1'%d$'", PREFIX, TmpMoney);
set_bit(g_bProcedure, id);
}
case 1:
{
give_item(id, "weapon_hegrenade");
ColorChat(id, RED, "^1[^4%s^1] ^3Бонус за steam : ^1'Боевая граната'", PREFIX);
reset_bit(g_bProcedure, id);
}
case 2:
{
give_item(id, "weapon_flashbang");
cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
ColorChat(id, RED, "^1[^4%s^1] ^3Бонус за steam : ^1'Слеповая граната'", PREFIX);
reset_bit(g_bProcedure, id);
}
case 3:
{
give_item(id, "item_assaultsuit");
ColorChat(id, RED, "^1[^4%s^1] ^3Бонус за steam : ^1'Броня'", PREFIX);
reset_bit(g_bProcedure, id);
}
case 4:
{
for(new i = 0; i < 6; i++) // Получаем все пистолеты из pistols[6]
{
fm_strip_user_gun(id, pistols[i]) // Отобрали пистолет
}
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 14);
ColorChat(id, RED, "^1[^4%s^1] ^3Бонус за steam : ^1'Deagle'", PREFIX);
reset_bit(g_bProcedure, id);
}
}
}
}
}
stock bool:is_user_steam(id)
{
// Author Sh0oter
static dp_pointer
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d", id)
server_exec()
return (get_pcvar_num(dp_pointer) == 2) ? true : false
}
return true
}
В этой теме было размещено решение! Перейти к решению.
Вложения
-
4.3 KB Просмотры: 604
Последнее редактирование модератором: