KBilly Posted October 3, 2015 Share Posted October 3, 2015 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
KariiiM Posted October 3, 2015 Share Posted October 3, 2015 Explain your problem better and give some info like this script is about what? Link to comment
KBilly Posted October 3, 2015 Author Share Posted October 3, 2015 (edited) 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 October 3, 2015 by Guest Link to comment
KariiiM Posted October 3, 2015 Share Posted October 3, 2015 It's based on tinted windows script, I'd rather pm you the other half of the code if that's alright ? It's okay if i can help i'll Link to comment
KBilly Posted October 3, 2015 Author Share Posted October 3, 2015 Still want me to pm you it or ? Link to comment
KariiiM Posted October 3, 2015 Share Posted October 3, 2015 Still want me to pm you it or ? I told you i have no problem if you pmed me, if i can help i will Link to comment
Ab-47 Posted October 4, 2015 Share Posted October 4, 2015 if vehicle and not windowsDown and vehicle ~= getPedOccupiedVehicle(localPlayer) then if getElementData(vehicle, "tinted") or getElementData(vehicle, "tinted2") then end end How about this? ^ Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now