Raised This Month: $10 Target: $400
 2% 

Money Every 5 Minutes


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-17-2021 , 22:31   Re: Money Every 5 Minutes
Reply With Quote #21

In unique timer, replace Give_Money() with:
PHP Code:
public Give_Money(taskid)
{
    new 
id taskid TASK_GETMONEY;
    new 
CsTeams:csTeam cs_get_user_teamid );

    if ( 
CS_TEAM_T <= csTeam <= CS_TEAM_CT )
    {
        
cs_set_user_money(idmin(cs_get_user_money(id) + GIVE_AMOUNT16000))
    }

__________________
Bugsy is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 05-17-2021 , 22:33   Re: Money Every 5 Minutes
Reply With Quote #22

Go with traditional way I guess (?)

[Unique Timer]
Spoiler


Edit: @OP Use Bugsy's code as he said below first.
Edit2: Thank @+ARUKARI- for pointing that out. IDK how I missed that.
@Bugsy I will be careful next time. I already fixed it in my code
__________________
My plugin:

Last edited by Celena Luna; 05-18-2021 at 04:33.
Celena Luna is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-18-2021 , 01:18   Re: Money Every 5 Minutes
Reply With Quote #23

@Celena
You're forgetting this.
PHP Code:
CsTeams:iTeam =  cs_get_user_teamid ); 
__________________
+ARUKARI- is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-18-2021 , 01:26   Re: Money Every 5 Minutes
Reply With Quote #24

Yes, Celena please test your code before posting if you are not that experienced. This is going to turn into a multi-page thread because of simple code mistakes.

@OP, use Celena Luna's Unique Timer from here and replace the Give_Money() function with what I posted here
__________________
Bugsy is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-18-2021 , 04:14   Re: Money Every 5 Minutes
Reply With Quote #25

If using regamedll, you can also get 16000(more then) from mp_maxmoney.
__________________
+ARUKARI- is offline
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 05-18-2021 , 06:54   Re: Money Every 5 Minutes
Reply With Quote #26

Quote:
Originally Posted by Bugsy View Post
In unique timer, replace Give_Money() with:
PHP Code:
public Give_Money(taskid)
{
    new 
id taskid TASK_GETMONEY;
    new 
CsTeams:csTeam cs_get_user_teamid );

    if ( 
CS_TEAM_T <= csTeam <= CS_TEAM_CT )
    {
        
cs_set_user_money(idmin(cs_get_user_money(id) + GIVE_AMOUNT16000))
    }

Thanks works ;)
__________________
Ace67 is offline
Reply


Thread Tools
Display Modes

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 12:10.


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