Try this :
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define PLUGIN "No RoundEnd Money Bonus"
#define VERSION "0.0.1"
const m_iAccount = 115
new bool:g_bIsRestarting
new bool:g_bIsNewRound
new gmsgMoney
new g_iNewRoundPlayerMoney[33]
public plugin_init()
{
register_plugin( PLUGIN, VERSION, "ConnorMcLeod" )
register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
register_event("TextMsg", "Event_TextMsg_Restart", "a", "2&#Game_C", "2&#Game_w")
register_forward(FM_PlaybackEvent, "OnPlaybackEvent_Post", true)
RegisterHam(Ham_Spawn, "player", "OnCBasePlayer_Spawn_Post", true)
gmsgMoney = get_user_msgid("Money")
}
public Event_TextMsg_Restart()
{
g_bIsRestarting = true
}
public Event_HLTV_New_Round()
{
if( g_bIsRestarting )
{
g_bIsRestarting = false
return
}
g_bIsNewRound = true
set_msg_block(gmsgMoney, BLOCK_SET)
new players[32], num, id
get_players(players, num, "h")
for(--num; num>=0; num--)
{
id = players[num]
g_iNewRoundPlayerMoney[id] = get_pdata_int(id, m_iAccount)
}
}
public OnCBasePlayer_Spawn_Post( id )
{
if( g_bIsNewRound && is_user_alive(id) )
{
set_pdata_int(id, m_iAccount, g_iNewRoundPlayerMoney[id])
}
}
public OnPlaybackEvent_Post()
{
if( g_bIsNewRound )
{
g_bIsNewRound = false
set_msg_block(gmsgMoney, BLOCK_NOT)
}
}
__________________