Raised This Month: $ Target: $400
 0% 

[REQ] limit max money below $16000


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-30-2012 , 01:59   Re: [REQ] limit max money below $16000
Reply With Quote #5

Quote:
Originally Posted by NucL3ra View Post
Use 'Player Spawn'

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

new SetMoney

public plugin_init() 
{
    
register_plugin("Set money""author""version")

    
SetMoney register_cvar("amx_setmoney""4500")

    
RegisterHam(Ham_Spawn"player""start"1)  

}
public 
start() 
{
    new 
Players[32], alivePlayers;
    
get_players(PlayersalivePlayers"ach")
    for(new 
i=0alivePlayersi++) 
    {
        
cs_set_user_money(Players[i],get_pcvar_num(SetMoney))
    }

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_usResetDecalsg_iFwdPlaybackEventPmp_startmoney

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
m_usResetDecals engfunc(EngFunc_PrecacheEvent1"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(flagspInvokereventindex)
{
    if( 
eventindex == m_usResetDecals // couldn't be another one, but let's keep that check.
    
{
        
unregister_forward(FM_PlaybackEventg_iFwdPlaybackEventP1)
        new 
players[32], num
        get_players
(playersnum"ah")
        if( 
num )
        {
            new 
money get_pcvar_num(mp_startmoney)
            for(--
numnum>=0num--)
            {
                
cs_set_user_money(players[num], money)
            }
        }
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-30-2012 at 02:11.
ConnorMcLeod is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode