mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 12:42:54 +00:00
actions_on_button_press 1.0.1
This commit is contained in:
parent
2b84548292
commit
9cc07ff9a9
@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
This script shows how you can execute functions and change dvars for a player when that player presses a certain button while showing him instructions on his screen using the key defined in his game.
|
This script shows how you can execute functions and change dvars for a player when that player presses a certain button while showing him instructions on his screen using the key defined in his game.
|
||||||
|
|
||||||
If you use `+melee` and the player's melee key is set to V it'll show V on his screen, if he uses another key it'll show his key.
|
|
||||||
|
|
||||||
* The first button lets the player toggle the `camera_thirdPerson` dvar (used to play in third person while keeping the crosshair on and is also better/more configurable than `cg_thirdPerson` in my opinion)
|
* The first button lets the player toggle the `camera_thirdPerson` dvar (used to play in third person while keeping the crosshair on and is also better/more configurable than `cg_thirdPerson` in my opinion)
|
||||||
Note that `camera_thirdPerson` is a special case and needs to be changed with `SetDynamicDvar()` but in most cases like with `cg_thirdPerson` you'd use `SetDvar()` instead.
|
Note that `camera_thirdPerson` is a special case and needs to be changed with `SetDynamicDvar()` but in most cases like with `cg_thirdPerson` you'd use `SetDvar()` instead.
|
||||||
|
|
||||||
* The second button lets the player suicide using the `Suicide()` function.
|
* The second button lets the player suicide using the `Suicide()` function.
|
||||||
|
|
||||||
|
If you use `+melee` and the player's melee key is set to V it'll show V on his screen, if he uses another key it'll show his key.
|
||||||
If you want to use another button simply change `level.third_person_button` and/or `level.suicide_button` values and it will update the button pressed to start the function and the text displayed on the player's screen.
|
If you want to use another button simply change `level.third_person_button` and/or `level.suicide_button` values and it will update the button pressed to start the function and the text displayed on the player's screen.
|
||||||
|
|
||||||
I used actionslot 6 and 7 because (to my knowledge) they are not used by anything else in the game
|
I used actionslot 6 and 7 because (to my knowledge) they are not used by anything else in the game
|
||||||
@ -31,4 +30,4 @@ Here is a non-exhaustive list of buttons you can use
|
|||||||
"+speed_throw"
|
"+speed_throw"
|
||||||
"+stance"
|
"+stance"
|
||||||
"+breathe_sprint"
|
"+breathe_sprint"
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user