Добавлено спустя 9 минут 41 секунду:
- Код: Выделить всё
/**
* Simple plugin to block earning money in new round for map objectives.
*
* Home post:
* http://c-s.net.ua/forum/index.php?act=findpost&pid=860111
*
* Last update:
* 11/13/2015
*/
/* Copyright 2015 Safety1st
Block Earning Money in New Round is free software;
you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Block Earning Money in New Round"
#define VERSION "0.1"
#define AUTHOR "Safety1st"
new giMaxPlayers
public plugin_init() {
register_plugin( PLUGIN, VERSION, AUTHOR )
register_event( "HLTV", "EventNewRound", "a", "1=0", "2=0" )
giMaxPlayers = get_maxplayers()
}
public EventNewRound() {
new iPlayers[32], iPlayersNum, iPlayer
get_players( iPlayers, iPlayersNum, "h" ) // skip HLTV
for ( new i; i < giMaxPlayers; i++ ) {
iPlayer = iPlayers[i]
#if AMXX_VERSION_NUM < 183
const m_boolsKilled = 222
const m_bNotReceivingMoneyNextRound = (1<<16)
set_pdata_int( iPlayer, m_boolsKilled, m_boolsKilled | m_bNotReceivingMoneyNextRound )
#else
const m_bNotReceivingMoneyNextRound = 890
set_pdata_bool( iPlayer, m_bNotReceivingMoneyNextRound, true )
#endif
}
}