AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Money By Walking (https://forums.alliedmods.net/showthread.php?t=174780)

Franc1sco 12-25-2011 07:42

[CS:S] Money By Walking
 
Curent Version: 2.1



Description:

You receive money by walking.


CVar's (and documentation):
Put in server.cfg
Code:

sm_moneybywalking_amount "5" // Determine how much money is received.
sm_moneybywalking_ratio "10" // Movements required for add money (1 movement can be produced depending of sm_monyebywalking_interval.)
sm_moneybywalking_interval "0.2" // how often count the movement (defaul: 0.2 seconds. every 1 seconds is equal to 1.0)
sm_moneybywalking_distance "20.0" // distance required from the last count for add a movement  (defaul: 20.0)


Changelog:

Code:

v1.0 - 25.12.2011
 -Released

V1.1 - 26.12.11
 -Renamed to "Money by Walking"
 -Minor code changes

V2.0 - 2.01.2013
 -Recoded and optimized

V2.1 - 3.01.2013
 -Changed the method for detect movement (more effective now)
 -Added new cvars



Donations (optional):

If you apreciate my work, you can donate me via paypal or with a trade offer


Download:

Main repository
Direct download
Code changes

Franc1sco 12-26-2011 16:35

Re: [CS:S] Money To Walk
 
New version! 1.1

change log:

-Renamed to "Money by Walking"
-Minor code changes

Mitchell 01-02-2013 00:13

Re: [CS:S] Money By Walking
 
You should probably make it of-habit to keep the lines in order, not putting tab indents too much, making it harder to read. also,
GetConVarInt * MaxClient * GameFrame
+
making 3 new variables in that loop.
will put an unnecessary toll on the server.
How was this approved?

Franc1sco 01-02-2013 00:28

Re: [CS:S] Money By Walking
 
I will check it.


This plugin is very old lol

Franc1sco 01-02-2013 00:53

Re: [CS:S] Money By Walking v2.0
 
New version 2.0

-recoded and optimized

Mitchell 01-02-2013 17:12

Re: [CS:S] Money By Walking v2.0
 
Code:

if (GetClientButtons(i) && (IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT))
should be:
Code:

if (GetClientButtons(i) & (IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT))
Major bug, as it will give money for holding down any key, like TAB, and giving money for not 'walking'

Quote:

Originally Posted by Antithasys
What is an approved plugin:
A plugin that has been screened by the approval staff and recognized to contain good, clean code.

This code isn't very 'clean'

Franc1sco 01-03-2013 08:19

Re: [CS:S] Money By Walking v2.1
 
New version 2.1

-Changed the method for detect movement (more effective now)
-Added new cvars:
Code:

sm_moneybywalking_interval "0.2" // how often count the movement (defaul: 0.2 seconds. every 1 seconds is equal to 1.0)
sm_moneybywalking_distance "20.0" // distance required from the last count for add a movement  (defaul: 20.0)


Download in first post


All times are GMT -4. The time now is 20:37.

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