test
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
|
||||
//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) {
|
||||
var showGui = true;
|
||||
@@ -140,12 +141,10 @@ export default function keys(globalData: IGlobalData) {
|
||||
mp.gui.takeScreenshot(new Date().toLocaleDateString(), 1, 100, 80);
|
||||
});
|
||||
|
||||
setInterval(() => {
|
||||
if (mp.keys.isDown(17) && mp.keys.isDown(72)) { //CTRL + H
|
||||
mp.events.call("keyPress:ControllH"); //hup
|
||||
return;
|
||||
}
|
||||
}, 100);
|
||||
BetterBindings.bind('ctrl + g', () => {
|
||||
mp.events.call("keyPress:ControllH"); //hup
|
||||
return;
|
||||
});
|
||||
|
||||
//F2 //Noclip
|
||||
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=",
|
||||
"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": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
|
||||
@@ -22,5 +22,8 @@
|
||||
"ProjectOpened": [
|
||||
"watch"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"ragemp-better-bindings": "^1.0.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
[Command("hup")]
|
||||
public void CmdAnim(Player player)
|
||||
{
|
||||
if (player.HasAnimation("hup")) { player.ClearAnimation(); }
|
||||
if (player.HasAnimation("hup")) { player.ClearAnimation(); return; }
|
||||
if (player.HasAnimation())
|
||||
return;
|
||||
|
||||
|
||||
@@ -969,7 +969,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
[RemoteEvent("keyPress:ControllH")]
|
||||
public void KeyPressControllH(Player player)
|
||||
{
|
||||
if (player.HasAnimation("hup")) { player.ClearAnimation(); }
|
||||
if (player.HasAnimation("hup")) { player.ClearAnimation(); return; }
|
||||
if (player.HasAnimation())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user