Skip to content

Commit cb00e75

Browse files
committed
Console v0.61
1 parent 79af529 commit cb00e75

File tree

2 files changed

+50
-3
lines changed

2 files changed

+50
-3
lines changed

CLEO Redux/GTA SA/Console/Console[mem]/index.ts

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ enum Proofs {
1818
}
1919

2020
// Constants
21-
const version: string = '0.6';
21+
const version: string = '0.61';
2222
const plr: Player = new Player(0);
2323
const plc: Char = plr.getChar();
2424
const plp: int = Memory.GetPedPointer(plc);
@@ -85,7 +85,9 @@ const numPadButtons: {
8585
{ id: KeyCode.NumPad6, char: '6' },
8686
{ id: KeyCode.NumPad7, char: '7' },
8787
{ id: KeyCode.NumPad8, char: '8' },
88-
{ id: KeyCode.NumPad9, char: '9' }
88+
{ id: KeyCode.NumPad9, char: '9' },
89+
{ id: KeyCode.Subtract, char: '-' },
90+
{ id: KeyCode.Decimal, char: '.' },
8991
];
9092

9193
// Variables
@@ -631,6 +633,43 @@ let cmdList: {
631633
}
632634
return false;
633635
}
636+
},
637+
{ // Clear area
638+
name: 'CLEAR AREA ',
639+
template: 'CLEAR AREA ~y~radius: float',
640+
func: function (): boolean {
641+
let radius = command.match(/[\d.]+/);
642+
if (radius) {
643+
let pos = plc.getCoordinates();
644+
World.ClearArea(pos.x, pos.y, pos.z, +radius[0], true);
645+
return true;
646+
}
647+
return false;
648+
}
649+
},
650+
{ // Pedestrians density
651+
name: 'PED DENSITY ',
652+
template: 'PED DENSITY ~y~float',
653+
func: function (): boolean {
654+
let density = command.match(/[\d.]+/);
655+
if (density) {
656+
World.SetPedDensityMultiplier(+density[0]);
657+
return true;
658+
}
659+
return false;
660+
}
661+
},
662+
{ // Car density
663+
name: 'CAR DENSITY ',
664+
template: 'CAR DENSITY ~y~float',
665+
func: function (): boolean {
666+
let density = command.match(/[\d.]+/);
667+
if (density) {
668+
World.SetCarDensityMultiplier(+density[0]);
669+
return true;
670+
}
671+
return false;
672+
}
634673
}
635674
];
636675

@@ -944,7 +983,7 @@ function runCommand() {
944983
if (cmd.func()) {
945984
Sound.AddOneOffSound(0, 0, 0, ScriptSound.SoundAmmunationBuyWeapon);
946985
if (cmd.lastState !== null) cmd.lastState = command;
947-
lastCmd = command;
986+
lastCmd = cmd.lastState !== null ? command : cmd.name;
948987
updateOutputString();
949988
} else if (output !== cmd.template) {
950989
Sound.AddOneOffSound(0, 0, 0, ScriptSound.SoundAmmunationBuyWeaponDenied);

CLEO Redux/GTA SA/Console/readMe.md renamed to CLEO Redux/GTA SA/Console/Console[mem]/readMe.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<summary>Version history</summary>
1111

1212
```diff
13+
v0.61 [22.03.2025]
14+
+ NumPad support (0-9, `.`, `-`)
15+
+ `CLEAR AREA`, `PED DENSITY`, `CAR DENSITY` commands
16+
1317
v0.6 [21.03.2025]
1418
+ Command line is now shown in the upper-left corner.
1519
+ Search and autocompletion improvements.
@@ -34,6 +38,10 @@ v0.5 [17.03.2025]
3438
<summary>История изменений</summary>
3539

3640
```diff
41+
v0.61 [22.03.2025]
42+
+ Поддержка NumPad (0-9, `.`, `-`)
43+
+ Команды `CLEAR AREA`, `PED DENSITY`, `CAR DENSITY`
44+
3745
v0.6 [21.03.2025]
3846
+ Командная строка перемещена в левый верхний угол.
3947
+ Улучшени поиска и автозавершения.

0 commit comments

Comments
 (0)