Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help me creating a vb script

Featured Replies

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. :happy:

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!

Edited by RIPAciD

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. :happy:

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!

To do it remotely try making it so. if player.area = (5.0) then if e.key = keys.l then carlock() (this is not the correct code)

something of that nature, ive not got experience with IV scripst, but i do have experience with vb. sorry i couldent be of more help

|| All my New || Unreleased || Current, Mods can be found || HERE ||

  • Author

Yeah, but you must specify the player car not a random car, damn why I suck so much :(

I searched google for some tutorials but I found only a list of native events

--edit--

Oh yeah, I found scripthook.NET full documentation

I will read it, let's hope I'm not too stupid and I can learn something.

--edit--

Yeap, I'm to stupid, I also have an eye disease and that is a looong documentation, too much to read :sad:

--edit--

I found a script but is not vb, is C# car alarm

Edited by RIPAciD

This is a support topic.
Only reply here to offer help or assistance to RIPAciD. Off-topic or "me too" replies will be removed.

Need support yourself? Make a new topic instead.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.