Money Every 5 Minutes
Hello, im currently searching a plugin for get money all 5 minutes ex:
You get money for every 5 minutes played. |
Re: Money Every 5 Minutes
Look like u sharing every 1hour man, you can't wait ?
|
Re: Money Every 5 Minutes
Quote:
|
Re: Money Every 5 Minutes
[Global Timer]
- Everyone get money every 5 minutes
Spoiler
[Unique Timer] - The player have to stay in server for 5 minutes to get money. - Disconnect = reset timer
Spoiler
P/S: Please reply if it work or not |
Re: Money Every 5 Minutes
Thanks works :D
|
Re: Money Every 5 Minutes
@Celena Luna - You do not need to check is_user_connected() on players returned by get_players() as it only returns connected players. And you want to avoid calling the same native more than once when it's guaranteed to return the same value, in this case your two cs_get_user_team() calls are redundant. You should store the value in a variable and use that in your conditions, or do it as I have below. And this is more of a style thing, but IMO there's no sense in checking negative conditions to return or continue, just execute the applicable code when the condition is met, as I have below.
PHP Code:
|
Re: Money Every 5 Minutes
Quote:
|
Re: Money Every 5 Minutes
Edited
|
Re: Money Every 5 Minutes
Quote:
|
Re: Money Every 5 Minutes
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 ) |
Re: Money Every 5 Minutes
Quote:
Code:
public Give_Money() |
Re: Money Every 5 Minutes
I thought you were using the code I posted here. I showed you what you had to replace in each of these 2 snips.
|
Re: Money Every 5 Minutes
Quote:
Code:
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\cstrike\addons\amxmodx\scripting\money5min.sma(67 -- 69) : error 001: expected token: ",", but found "}" Code:
public Give_Money() |
Re: Money Every 5 Minutes
PHP Code:
|
Re: Money Every 5 Minutes
Quote:
|
Re: Money Every 5 Minutes
Quote:
Hey @Bugsy, can you edit for this lines 16k max money, thx. Code:
public client_disconnect(id) remove_task(id+TASK_GETMONEY) |
Re: Money Every 5 Minutes
cs_set_user_money(id, min( cs_get_user_money(id) + GIVE_AMOUNT , 16000 ) )
|
Re: Money Every 5 Minutes
Quote:
|
Re: Money Every 5 Minutes
[Global Timer]
Spoiler
[Unique Timer]
Spoiler
I edited based on my post P/S: Please reply if it work or not @Bugsy: Sorry, I got infected by Dias's style who usually check the negative condition. :3 Though, I would use positive condition if the positive condition is less than negative |
Re: Money Every 5 Minutes
Quote:
|
Re: Money Every 5 Minutes
In unique timer, replace Give_Money() with:
PHP Code:
|
Re: Money Every 5 Minutes
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 |
Re: Money Every 5 Minutes
@Celena
You're forgetting this. PHP Code:
|
Re: Money Every 5 Minutes
|
Re: Money Every 5 Minutes
If using regamedll, you can also get 16000(more then) from mp_maxmoney.
|
Re: Money Every 5 Minutes
Quote:
|
All times are GMT -4. The time now is 04:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.