Руслан Миронов
Пользователь
- Регистрация
- 24 Июн 2017
- Сообщения
- 276
- Симпатии
- 3
- Предупреждения
- 30
- Пол
- Мужской
Привет всем! Ищу плагин для CW сервера вывод информации о количестве денег у тимэйтов.
#include <amxmodx>
#include <reapi>
#include <fakemeta>
#define ONE_TIME_IN_ROUND
new g_bitUserConnected;
#if defined ONE_TIME_IN_ROUND
new g_bitSended;
#endif
public plugin_init(){
RegisterHookChain(RG_CBasePlayer_Spawn,"CBasePlayer_Spawn_Post",true);
register_forward(FM_ClientDisconnect,"OnClientDisconnect",0);
#if defined ONE_TIME_IN_ROUND
RegisterHookChain(RG_RoundEnd,"RG_RounEnd_Post",true);
#endif
}
public CBasePlayer_Spawn_Post(iPlayer){
if(!(g_bitUserConnected & (1 << (iPlayer & 31))))return;//bot?
#if defined ONE_TIME_IN_ROUND
if(g_bitSended & (1 << (iPlayer & 31)))return;
#endif
if(is_user_alive(iPlayer)){
new money[16];format(money, charsmax(money), "$%d",get_member(iPlayer, m_iAccount));
rg_internal_cmd(iPlayer, "say_team", money)
}
}
#if defined ONE_TIME_IN_ROUND
public RG_RounEnd_Post()g_bitSended=0;
#endif
public client_putinserver(id)if(!is_user_bot(id)&&!is_user_hltv(id))g_bitUserConnected |= (1 << (id & 31));
public OnClientDisconnect(id)g_bitUserConnected &= ~(1 << (id & 31));
public CBasePlayer_Spawn_Post(iPlayer){
if(!(g_bitUserConnected & (1 << (iPlayer & 31))))return;//bot?
#if defined ONE_TIME_IN_ROUND
if(g_bitSended & (1 << (iPlayer & 31)))return;
#endif
if(is_user_alive(iPlayer)){
new money[16];format(money, charsmax(money), "$%d",get_member(iPlayer, m_iAccount));
rg_internal_cmd(iPlayer, "say_team", money);
#if defined ONE_TIME_IN_ROUND
g_bitSended |= (1 << (iPlayer & 31));
#endif
}
}