Hi guys, can someone help me to create a vb script?
I want to lock/unlock the car doors remotely, after locking the doors set alarm and when a ped is trying to steal the car, the alarm will start. Don't worry about peds stealing cars, I already have a mod called CriminalActs and peds are stealing cars, they steal money from your pocket, etc.
I can't create a script from start, I managed to edit some vb scripts but nothing more ...
An example of a lock/unlock script but this works only if the player is in vehicle.
Public Class LockPick
Inherits Script
Public vehlockveh As Vehicle
Public Sub New()
Interval = 1500
End Sub
Private Sub LockPick(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown
If e.Key = Keys.L Then
If Player.Character.isInVehicle Then
carlock()
End If
End If
End Sub
Private Sub carlock()
If ((Player.Character.CurrentVehicle.Model.isHelicopter Or Player.Character.CurrentVehicle.Model.isCar) And Player.Character.CurrentVehicle.GetPedOnSeat(VehicleSeat.Driver) = Player.Character) Then
If Not Player.Character.CurrentVehicle.DoorLock = DoorLock.None Then
Player.Character.CurrentVehicle.DoorLock = DoorLock.None
My.Computer.Audio.Play(Game.InstallFolder & "\scripts\LockPick\audio\unlock.wav")
Game.DisplayText("Doors open", 1000)
Else
Player.Character.CurrentVehicle.DoorLock = DoorLock.ImpossibleToOpen
My.Computer.Audio.Play(Game.InstallFolder & "\scripts\LockPick\audio\lock.wav")
Game.DisplayText("Doors locked!", 1000)
vehlockveh = Player.Character.CurrentVehicle
End If
End If
End Sub
Thank you!