@@ -18,7 +18,7 @@ enum Proofs {
18
18
}
19
19
20
20
// Constants
21
- const version : string = '0.6 ' ;
21
+ const version : string = '0.61 ' ;
22
22
const plr : Player = new Player ( 0 ) ;
23
23
const plc : Char = plr . getChar ( ) ;
24
24
const plp : int = Memory . GetPedPointer ( plc ) ;
@@ -85,7 +85,9 @@ const numPadButtons: {
85
85
{ id : KeyCode . NumPad6 , char : '6' } ,
86
86
{ id : KeyCode . NumPad7 , char : '7' } ,
87
87
{ 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 : '.' } ,
89
91
] ;
90
92
91
93
// Variables
@@ -631,6 +633,43 @@ let cmdList: {
631
633
}
632
634
return false ;
633
635
}
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
+ }
634
673
}
635
674
] ;
636
675
@@ -944,7 +983,7 @@ function runCommand() {
944
983
if ( cmd . func ( ) ) {
945
984
Sound . AddOneOffSound ( 0 , 0 , 0 , ScriptSound . SoundAmmunationBuyWeapon ) ;
946
985
if ( cmd . lastState !== null ) cmd . lastState = command ;
947
- lastCmd = command ;
986
+ lastCmd = cmd . lastState !== null ? command : cmd . name ;
948
987
updateOutputString ( ) ;
949
988
} else if ( output !== cmd . template ) {
950
989
Sound . AddOneOffSound ( 0 , 0 , 0 , ScriptSound . SoundAmmunationBuyWeaponDenied ) ;
0 commit comments