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 ) |
All times are GMT -4. The time now is 09:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.