View Single Post
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 04-18-2021 , 01:03   Re: Money Every 5 Minutes
Reply With Quote #11

Quote:
Originally Posted by Bugsy View Post
Replace:

cs_get_user_money(id) + GIVE_AMOUNT
with
min( cs_get_user_money(id) + GIVE_AMOUNT , 16000 )

And

cs_get_user_money(PlayerList[i]) + GIVE_AMOUNT
with
min( cs_get_user_money(PlayerList[i]) + GIVE_AMOUNT , 16000 )
the min give error, so i have do this

Code:
public Give_Money()
{
    static PlayerList[32], PlayerNum; PlayerNum = 0
    static id
    static CsTeams:iTeam;
    get_players(PlayerList, PlayerNum, "h")
    for(new i=0; i<PlayerNum;i++)
    {
        id = PlayerList[i];
        iTeam = cs_get_user_team(id)
        if(iTeam == CS_TEAM_SPECTATOR || iTeam == CS_TEAM_UNASSIGNED)
            continue

        cs_set_user_money(id, cs_get_user_money(id) + GIVE_AMOUNT , 16000 )
    }
}
__________________
CS:CZ > CS 1.6

Last edited by Ace67; 04-18-2021 at 01:03.
Ace67 is offline