|
Author
|
Message
|
|
buttmonkey
|

05-30-2012
, 03:05
Re: [REQ] limit max money below $16000
|
#1
|
Quote:
Originally Posted by ConnorMcLeod
Damn you are not serious !!!!! Can't believe you dared to release a big plugin such as ProKreedz...
About plugin, search in approved plugin, you can find one doing what you want.
EDIT : In fact it does not exactly what you want : http://forums.alliedmods.net/showthr...211#post743211 (even released one)
Try this then (use mp_startmoney cvar to set money):
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#define VERSION "0.0.1"
#define PLUGIN ""
new m_usResetDecals, g_iFwdPlaybackEventP, mp_startmoney
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "ConnorMcLeod")
m_usResetDecals = engfunc(EngFunc_PrecacheEvent, 1, "events/decal_reset.sc")
mp_startmoney = get_cvar_pointer("mp_startmoney")
register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
}
public Event_HLTV_New_Round()
{
g_iFwdPlaybackEventP = register_forward(FM_PlaybackEvent, "OnPlaybackEvent_Post", 1)
}
public OnPlaybackEvent_Post(flags, pInvoker, eventindex)
{
if( eventindex == m_usResetDecals ) // couldn't be another one, but let's keep that check.
{
unregister_forward(FM_PlaybackEvent, g_iFwdPlaybackEventP, 1)
new players[32], num
get_players(players, num, "ah")
if( num )
{
new money = get_pcvar_num(mp_startmoney)
for(--num; num>=0; num--)
{
cs_set_user_money(players[num], money)
}
}
}
}
|
when a player connects to the server after the round has started?
|
|
|
|