Raised This Month: $ Target: $400
 0% 

Money Every 5 Minutes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-18-2021 , 00:20   Re: Money Every 5 Minutes
Reply With Quote #1

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 )
__________________

Last edited by Bugsy; 04-18-2021 at 00:22.
Bugsy is offline
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 04-18-2021 , 01:03   Re: Money Every 5 Minutes
Reply With Quote #2

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
Reply



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 19:53.


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