Skip to content

Commit

Permalink
Updated the README file.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinci6k committed Mar 27, 2021
1 parent f781ca8 commit c62745c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,35 @@ See the plugin in action: https://youtu.be/GoANDNFMt2A
## Usage
While holding a flashbang, press your weapon inspect key (F by default) to change the throwing mode.

## Integration with other plugins
Do you want to use Curving Flash as part of another plugin? Maybe as a passive skill or an item that can be picked up?

If the answer is yes, head over to `../csgo/cfg/source-python/curving_flash/config.cfg` and set `cf_package_mode` to **1**. This will disable the default plugin behavior, and as such, players will no longer be able to change their throwing mode on their own.

Now the power to change the throwing mode of players lies within your plugin. There are two ways to change a player's throwing mode.

1. Use the PlayerCF class.
```py
from curving_flash.core.constants import ThrowingMode
from curving_flash.core.players import PlayerCF

# Disables curving for this player, they can only throw flashbangs normally.
# All players will have this mode set by default.
PlayerCF(index).throwing_mode = ThrowingMode.NORMAL

# Default plugin behavior - player can inspect their flashbang to change their
# throwing mode.
PlayerCF(index).throwing_mode = ThrowingMode.DEFAULT

# All flashbangs thrown by this player will curve.
PlayerCF(index).throwing_mode = ThrowingMode.ALWAYS_CURVE
```
2. Use the `cf_set_mode <userid> <mode>` server command, where `mode` can be:
* **0**: Normal (default flashbang throw)
* **1**: Player controlled (default plugin behavior)
* **2**: Always curve

**NOTE:** Keep in mind that the throwing mode resets whenever the player dies.

## Supported Games
Counter-Strike: Global Offensive

0 comments on commit c62745c

Please sign in to comment.