Quantcast

Jump to content

» «
Photo

Possible to spawn abandoned cars through Liberty?

8 replies to this topic
Whitemike20052
  • Whitemike20052

    Player Hater

  • Members
  • Joined: 19 Dec 2010

#1

Posted 30 April 2012 - 06:35 PM

Or maybe wrecked vehicles like CJ_WRECK_1?

Or how about dead bodies? Is there a way to spawn those?


I mean spawning these objects randomly about the game world.

Also is there a way to increase the amount of leaves and paper that flys around as you play?

FaTony
  • FaTony

    C++ guy

  • Members
  • Joined: 12 Aug 2011

#2

Posted 30 April 2012 - 07:42 PM

You can create objects through scripts.

PussyTamer
  • PussyTamer

    Player Hater

  • BUSTED!
  • Joined: 30 Apr 2012

#3

Posted 30 April 2012 - 08:31 PM

http://www.gtamoddin...article_effects

use a native function to trigger or star a ptfx, pm me if u need help getting it done

Yululu
  • Yululu

    Player Hater

  • Members
  • Joined: 30 Apr 2012

#4

Posted 30 April 2012 - 11:39 PM

Wut programs u use? try ornellas.exe

Whitemike20052
  • Whitemike20052

    Player Hater

  • Members
  • Joined: 19 Dec 2010

#5

Posted 02 May 2012 - 11:15 PM

Im trying to get random bodies, vehicles, wrecks and other ambient enviroment effects to spawn at random, can someone please help me?

ripJuniorSeau
  • ripJuniorSeau

    Player Hater

  • BUSTED!
  • Joined: 02 May 2012

#6

Posted 02 May 2012 - 11:20 PM

what do you code in?

ripJuniorSeau
  • ripJuniorSeau

    Player Hater

  • BUSTED!
  • Joined: 02 May 2012

#7

Posted 02 May 2012 - 11:59 PM Edited by ripJuniorSeau, 03 May 2012 - 12:04 AM.

yeah so outbreak is written in vb, do you know any vb?

@Yululu

wtf is ornellas.exe??

@FaTony

No sh*t sherlock, next time give a helpful answer or stfu retard

Whitemike20052
  • Whitemike20052

    Player Hater

  • Members
  • Joined: 19 Dec 2010

#8

Posted 03 May 2012 - 03:47 PM

Yea thats what i was thinking about ornellas.exe...

Anyways yes its in .vb


I have no idea how to code or set up scripts at all aside from going inside the mods and editing some numbers and variables.

motorsport71
  • motorsport71

    newbie modder

  • Members
  • Joined: 20 Oct 2009

#9

Posted 18 May 2012 - 04:06 AM

Hey, Whitemike20052, you can modify these settings smile.gif
CODE

Imports System
Imports System.Collections
Imports System.Drawing
Imports System.Windows.Forms
Imports GTA
Public Class RandomDamagedVehicles
   Inherits Script
   Private Son As Boolean = False
   Public Sub New()
       Me.interval = 1000
       BindKey(Settings.GetValueKey("Toggle Script", "SETTINGS", Keys.F7), New KeyPressDelegate(AddressOf ScriptOn))
   End Sub
   Private Function RandomNumber(ByVal min As Integer, ByVal max As Integer) As Integer
       Dim random As New Random()
       Return random.Next(min, max)
   End Function
   Private Sub RandomVehicleDamages_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
       If son Then
           Dim random As New Random()
           Dim h As Integer = RandomNumber(0, 359)
           Dim vs As Integer = RandomNumber(0, 5)
           Dim vs2 As Integer = RandomNumber(0, 2)
           Dim r As Integer = RandomNumber(0, 2)
           Dim d As Integer = RandomNumber(1, 5)
           Dim hz As Integer = RandomNumber(0, 4)
           Dim n As Integer = RandomNumber(0, 40)
           Dim ez As Integer = RandomNumber(10, 500)


           If vs = 2 Then
               Dim vehicle As vehicle = world.createvehicle(player.character.position.around(30.0F).toground)
               If exists(vehicle) AndAlso vehicle IsNot Nothing Then
                   Vehicle.EngineHealth = ez
                   vehicle.dirtyness = d

                   If vs2 = 0 Then
                       Vehicle.PlaceOnNextStreetProperly()
                       Dim blip As blip = blip.addblip(vehicle)
                       blip.color = blipcolor.grey
                   End If


                   If vs2 = 1 Then
                       vehicle.heading = h
                       Vehicle.PlaceOnGroundProperly()
                       Dim blip As blip = blip.addblip(vehicle)
                       blip.color = blipcolor.purple
                   End If

                   vehicle.nolongerneeded()

                   If r = 1 Then
                       Vehicle.EngineRunning = False
                   End If

                   If hz = 2 Then
                       Vehicle.HazardLightsOn = True
                   End If

                   If n = 2 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 0)
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 1)
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 2)
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 3)
                   End If

                   If n = 4 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 0)
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 2)
                   End If

                   If n = 7 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 1)
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 3)
                   End If

                   If n = 9 Then
                       Native.Function.Call("BREAK_CAR_DOOR", vehicle, 6)
                   End If

                   If n = 13 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 0)
                   End If

                   If n = 16 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 5)
                   End If

                   If n = 17 Then
                       Native.Function.Call("BREAK_CAR_DOOR", vehicle, 3)
                   End If

                   If n = 19 Then
                       Native.Function.Call("BREAK_CAR_DOOR", vehicle, 5)
                   End If

                   If n = 21 Then
                       Native.Function.Call("BREAK_CAR_DOOR", vehicle, 2)
                   End If


                   If n = 24 Then
                       Native.Function.Call("BREAK_CAR_DOOR", vehicle, 4)

                   End If

                   If n = 28 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 4)
                   End If

                   If n = 32 Then
                       Native.Function.Call("BREAK_CAR_DOOR", vehicle, 1)

                   End If

                   If n = 34 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 5)
                   End If

                   If n = 36 Then
                       Native.Function.Call("OPEN_CAR_DOOR", vehicle, 3)
                   End If

                   If n = 37 Then
                       Native.Function.Call("BREAK_CAR_DOOR", vehicle, 2)

                   End If
               End If
           End If
       End If
   End Sub
   Private Sub ScriptOn()
       SON = Not SON
       If SON Then
           Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Random Vehicle Placements Activated", 4000, 1)
       Else
           Native.Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", "STRING", "Random Vehicle Placements Deactivated", 4000, 1)
       End If
   End Sub
End Class


You can delete the lines that indicate the blips....
CODE
Dim blip As blip = blip.addblip(vehicle)
blip.color = blipcolor.purple

...after you see what the script is doing.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users