Quote:
Originally Posted by ZEDD_Intensity
Greetings,
Almost over 38 hours with no replies. Makes me doubt myself if I did something wrong in my main post.
I'd still await a reply. If there's any missing information, I'd be happy to update it.
Regards,
ZEDD
|
Damn your impatient, almost 38 hours and you're bumping your thread. Just because you posted a thread doesn't mean we have to fulfill your request. So have some patience and maybe someone will help you since it's a simple request.
Edit: Do you want to
set the players money or do you want to
add it to their money?
Set their money:
1st Round - $800
2nd Round - $1600
3rd Round - $2400
Add to their money
1st Round - player has $800 + $800 = $1600
2nd Round - player has $500 + $1600 = $2100
3rd Round - player has $1300 +$2400 = $3700
Edit 2: Here you go, this will add or set the player money. Check the cvar
PHP Code:
#include < amxmodx >
#include < cstrike >
#include < hamsandwich >
new pMoney, pAddSet
new gRound = 0;
public plugin_init( )
{
register_plugin( "MONEY", "1.0", "ZEDD" )
register_event( "TextMsg", "rRestart", "a", "2&#Game_C", "2&#Game_w" )
register_event( "HLTV", "newRound", "a", "1=0", "2=0" )
RegisterHam( Ham_CS_RoundRespawn, "player", "pSpawn", 1 )
pAddSet = register_cvar( "add_set_money", "1" ) // 1 = Add money 2 = Set player money
pMoney = register_cvar( "round_money", "800" )
}
public rRestart( )
{
gRound = 0
}
public newRound( )
{
gRound++
}
public pSpawn( id )
{
new money; money = cs_get_user_money( id )
if( gRound >= 2 )
{
switch( get_pcvar_num( pAddSet ) )
{
case 1:
{
cs_set_user_money( id, money + get_pcvar_num( pMoney ) * gRound )
}
case 2:
{
cs_set_user_money( id, get_pcvar_num( pMoney ) * gRound )
}
}
}
}
__________________