View Single Post
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 11-29-2020 , 13:21   Re: Money more than 16000
Reply With Quote #14

Quote:
Originally Posted by CrazY. View Post
You need to post the full code otherwise there's nothing we can do, you'll have to figure it out your own
If you are not experienced enough to solve the problem you should probably ask in suggestion/requests
Here is the full code :
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN  "[VIP] Money Start"
#define VERSION "0.1"
#define AUTHOR  "Celena Luna"

new g_FirstRoundg_iLastRoundMoney[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w");
    
register_logevent("logevent_round_end"2"1=Round_End"

    
RegisterHam(Ham_Spawn"player""fw_Player_Spawn_Post"1)
    
g_FirstRound 1
}

public 
Event_TextMsg_Restart()
{
    
g_FirstRound 1
}

public 
logevent_round_end()
{
    
g_FirstRound 0

    
new iPlayers[32] , iNum Player;
    
get_playersiPlayers iNum "h" );
    
    for ( new 
iNum i++ )
    {    
        
Player iPlayers[i];
        
g_iLastRoundMoney[Player] = cs_get_user_money(Player
    }
}

public 
fw_Player_Spawn_Post(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
        
set_task(0.1"SetMoney"id//Set bit delay to replace the default bonus Win/Lose
}

public 
SetMoney(id)
{

    new 
money cs_get_user_money(id)

    if(
g_FirstRound == 1)
        
cs_set_user_money(id1000//For the first round
    
else 
        
cs_set_user_money(idg_iLastRoundMoney[id]+3000//Second round onward
    
    
cs_set_user_money(idmin(16000money))

HowToRuski is offline