Jump to content

Element Help Please


KBilly

Recommended Posts

Okay so I have this piece of code.

if vehicle and not windowsDown and vehicle ~= getPedOccupiedVehicle(localPlayer) and getElementData(vehicle, "tinted") or getElementData(vehicle, "tinted2") then 

Basically the problem is within this part.

and getElementData(vehicle, "tinted") or getElementData(vehicle, "tinted2") then 

My original line of code was this.

if vehicle and not windowsDown and vehicle ~= getPedOccupiedVehicle(localPlayer) and getElementData(vehicle, "tinted") then 

This worked fine but I added another tint element and now I want it to getElementData for either tinted or tinted2 if that makes sense. So basically I want it to have one or the other but it like I don't want to have it looking like this.

getElementData(vehicle, "tinted") and getElementData(vehicle, "tinted2") 

Simply because this will make sure it has both elements I only want it to have one or the other, thanks for all help in advance I appreciate it.

Link to comment

It's based on tinted windows script, I'd rather pm you the other half of the code if that's alright ?

It's kinda simple what I mean basically all you kinda have to know is that I simply need something to fetch to see if it has 1 out of 2 elements supplied so basically the script works like if it has the vehicle element "tinted" but I want to add another half based on the vehicle element "tinted2" Therefore what I mean is this line of code

if vehicle and not windowsDown and vehicle ~= getPedOccupiedVehicle(localPlayer) and getElementData(vehicle, "tinted") or getElementData(vehicle, "tinted2") then 
     

It fetched to see if it has both elements ? Correct ? I want it to see if it has one of them elements if that makes sense...

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...