File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
src/BPEssentials/Commands/Vehicles Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 70
70
"player_vehicle_locked" : " You have locked your {0}." ,
71
71
"player_vehicle_repaired" : " Repaired {0}." ,
72
72
"player_vehicle_spawned" : " Spawned {0}." ,
73
+ "player_vehicle_destroyed" : " Destroyed {0}." ,
73
74
"player_give" : " Gave {0} {2} {1}." ,
74
75
"discord" : " Our Discord: {0}" ,
75
76
"all_warned" : " {0} warned {1} for {2}" ,
Original file line number Diff line number Diff line change 319
319
" rv"
320
320
]
321
321
},
322
+ {
323
+ "CommandName" : " DestroyVehicle" ,
324
+ "Commands" : [
325
+ " destroyvehicle" ,
326
+ " dv"
327
+ ]
328
+ },
322
329
{
323
330
"CommandName" : " Discord" ,
324
331
"Commands" : [
Original file line number Diff line number Diff line change
1
+ using BPEssentials . Abstractions ;
2
+ using BPEssentials . ExtensionMethods ;
3
+ using BrokeProtocol . Entities ;
4
+
5
+ namespace BPEssentials . Commands
6
+ {
7
+ public class DestroyVehicle : BpeCommand
8
+ {
9
+ public void Invoke ( ShPlayer player )
10
+ {
11
+ var vehicle = player . curMount as ShTransport ;
12
+ if ( vehicle == null )
13
+ {
14
+ player . TS ( "player_notInVehicle" ) ;
15
+ return ;
16
+ }
17
+ vehicle . Destroy ( ) ;
18
+ player . TS ( "player_vehicle_destroyed" , vehicle . name ) ;
19
+ }
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments