IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Post mod/code requests in the Mod Requests topic

Post mod releases in the Mod Showroom

Read the Modding Rules BEFORE posting!

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Applying a script to all cars/peds?

 
Kit_Y  
Posted: Tuesday, Jun 12 2012, 09:42
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 23, 2012

XXXXX



Hello there!
I'm trying to put together a C# script that when activated will cause a vehicle's headlights to flash. I currently have the flash set as a tick event. The problem I have now is trying to extend the effect to more than one vehicle; I've tried using an array to stuff all the cars into and then running a foreach loop, but that flashes each car's lights in sequence rather than simultaneously. Any thoughts on how I could set it to be simultaneous?

Also, does anyone know if there's a function to turn on a vehicle's reverse lights without actually putting the car in reverse?

This post has been edited by Kit_Y on Tuesday, Jun 12 2012, 09:44
PM
  Top
 

 
motorsport71  
Posted: Wednesday, Jun 13 2012, 16:59
Quote Post


newbie modder
Group Icon
Group: Members
Joined: Oct 20, 2009

XXXXX



well, for Scripthookdotnet i would do this:
set it on a tick, but use this
CODE
world.getallvehicles()

on an array for .vb it would look like this:
CODE
Dim vehicles as vehicle() = world.getallvehicles()
for each vehicle as vehicle in vehicles
if exists(vehicle) andalso vehicle isnot nothing then
blah blah
PM
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG