File tree Expand file tree Collapse file tree
src/BPEssentials/Commands/Vehicles Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 "player_vehicle_locked" : " You have locked your {0}." ,
7171 "player_vehicle_repaired" : " Repaired {0}." ,
7272 "player_vehicle_spawned" : " Spawned {0}." ,
73+ "player_vehicle_destroyed" : " Destroyed {0}." ,
7374 "player_give" : " Gave {0} {2} {1}." ,
7475 "discord" : " Our Discord: {0}" ,
7576 "all_warned" : " {0} warned {1} for {2}" ,
Original file line number Diff line number Diff line change 319319 " rv"
320320 ]
321321 },
322+ {
323+ "CommandName" : " DestroyVehicle" ,
324+ "Commands" : [
325+ " destroyvehicle" ,
326+ " dv"
327+ ]
328+ },
322329 {
323330 "CommandName" : " Discord" ,
324331 "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