test
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
//https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes
|
//https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes
|
||||||
|
|
||||||
const player = mp.players.local;
|
import { Key } from '../game';
|
||||||
|
import BetterBindings from 'ragemp-better-bindings';
|
||||||
|
|
||||||
export default function keys(globalData: IGlobalData) {
|
export default function keys(globalData: IGlobalData) {
|
||||||
var showGui = true;
|
var showGui = true;
|
||||||
@@ -140,12 +141,10 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
mp.gui.takeScreenshot(new Date().toLocaleDateString(), 1, 100, 80);
|
mp.gui.takeScreenshot(new Date().toLocaleDateString(), 1, 100, 80);
|
||||||
});
|
});
|
||||||
|
|
||||||
setInterval(() => {
|
BetterBindings.bind('ctrl + g', () => {
|
||||||
if (mp.keys.isDown(17) && mp.keys.isDown(72)) { //CTRL + H
|
mp.events.call("keyPress:ControllH"); //hup
|
||||||
mp.events.call("keyPress:ControllH"); //hup
|
return;
|
||||||
return;
|
});
|
||||||
}
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
//F2 //Noclip
|
//F2 //Noclip
|
||||||
mp.keys.bind(0x71, false, () => {
|
mp.keys.bind(0x71, false, () => {
|
||||||
|
|||||||
5
ReallifeGamemode.Client/package-lock.json
generated
5
ReallifeGamemode.Client/package-lock.json
generated
@@ -2879,6 +2879,11 @@
|
|||||||
"integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
|
"integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"ragemp-better-bindings": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/ragemp-better-bindings/-/ragemp-better-bindings-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-mev0UT74EmBen1rdg8FP9bKFsxUtDH56X2SM2JQQsWWzCzVvRP0HIt1Wqn1DuomszgSt/uzxZaufwCFbeOU+/Q=="
|
||||||
|
},
|
||||||
"randombytes": {
|
"randombytes": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||||
|
|||||||
@@ -22,5 +22,8 @@
|
|||||||
"ProjectOpened": [
|
"ProjectOpened": [
|
||||||
"watch"
|
"watch"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ragemp-better-bindings": "^1.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
[Command("hup")]
|
[Command("hup")]
|
||||||
public void CmdAnim(Player player)
|
public void CmdAnim(Player player)
|
||||||
{
|
{
|
||||||
if (player.HasAnimation("hup")) { player.ClearAnimation(); }
|
if (player.HasAnimation("hup")) { player.ClearAnimation(); return; }
|
||||||
if (player.HasAnimation())
|
if (player.HasAnimation())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -969,7 +969,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
[RemoteEvent("keyPress:ControllH")]
|
[RemoteEvent("keyPress:ControllH")]
|
||||||
public void KeyPressControllH(Player player)
|
public void KeyPressControllH(Player player)
|
||||||
{
|
{
|
||||||
if (player.HasAnimation("hup")) { player.ClearAnimation(); }
|
if (player.HasAnimation("hup")) { player.ClearAnimation(); return; }
|
||||||
if (player.HasAnimation())
|
if (player.HasAnimation())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user