Garry's Mod

Garry's Mod

Not enough ratings
WePoint System
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Fun, Roleplay
File Size
Posted
Updated
38.117 KB
15 Sep @ 8:59pm
23 Sep @ 5:33pm
2 Change Notes ( view )

Subscribe to download
WePoint System

In 2 collections by w.black57
WeMods
24 items
Pseudo-Zombie Survival PvE
13 items
Description
This mod does nothing on its own and is used for modders

Splitted this mod from my Loadout Progression System for Sandbox so that other mods can make use of the point system.

Console Commands
1. wblpoint_addpoints <amount> [playername]
Adds the given amount of points to the player. If no player name is provided, it defaults to the one who commanded.

2. wblpoint_removepoints <amount> [playername]
Removes the given amount of points from the player (direct deduction).

3. wblpoint_spendpoints <amount> [playername]
Attempts to spend the given amount of points from the player. Fails if not enough points.

4. wblpoint_setpoints <amount> [playername]
Sets the player’s points to the given amount (overwrites existing value).

5. wblpoint_checkpoints [playername]
Checks and returns the current points of the player. If no name is provided, defaults to the caller.

6. wblpoint_checkpointsall
Returns a list of all players and their current point totals.

Console Variables
1. wblpoint_enabled (default 1)
Master switch for the point system.
1 = enabled, 0 = disabled.

2. wblpoint_pointmultiplier (default 1)
Multiplier applied to all point gains.
Example: 2 = double points, 0.5 = half points.

Global functions to add, remove or set points for the devs:
1. wblAddPoint(ply, pointToAdd, pos, useMultiplier)
ply – player that will receive the point gain
pointToAdd – amount of points to add
pos – position where the gain feedback (e.g. floating text) will appear
useMultiplier – optional boolean (default true), whether to apply the convar multiplier

2. wblRemovePoint(ply, pointToRemove, pos)
ply – player whose points will be reduced
pointToRemove – amount of points to remove (directly deducted, no checks)
pos – position where the removal feedback will appear

3. wblSpendPoints(ply, pointToSpend, pos)
ply – player attempting to spend points
pointToSpend – amount of points to spend
pos – position where the spend feedback will appear
returns – true if successful, false if not enough points, nil if point system is disabled

4. wblSetPoint(ply, newPoints, pos)
ply – player whose points will be set
newPoints – the new total points value for the player
pos – position where the set feedback will appear


Difference between Spend and remove points?
- Spend will first check if the player has enough points before deducting. It will not do anything if not enough and throw in a 'Not enough points' notification
- Remove points will reduce it without check

Difference with WeMoney System?
- WePoint is a 'Long term currency' (Like permanent upgrades, etc)
- WeMoney is a 'Short term currency' (Its easily modifiable, easily earned gamewise)
- idk its pretty subjective but thats how I like to make it :3

Current mods that use this system:
Loadout Progression System for Sandbox


Check out my other mods!

Donation would be appreciated for my work ^_^