villr Posted July 21, 2012 Share Posted July 21, 2012 (edited) Hello, i have some thing i dont know how to do, it's to search trough all vehicles and find elemntdata and search if any of those vehicles with that elementdata contains my accountname.. Here is my code i started on: for i,elem in ipairs(getElementsByType("vehicle"))do if getElementData(elem,"rentowner") then outputChatBox(getElementData(elem,"rentowner"),getRootElement(), 255,255,255) But i dont know how to continue.. The setting of the elementdata is like this: setElementData(vehicle, "rentowner", getAccountName(getPlayerAccount(source))) Edited July 21, 2012 by Guest Link to comment
unknooooown Posted July 21, 2012 Share Posted July 21, 2012 What do you want to do when the vehicle has been found? You are on the right track with the code, but we need some more info to help you. Link to comment
villr Posted July 21, 2012 Author Share Posted July 21, 2012 Well i want it to find the vehicle and set the data to "Charles" because he will own the boat when it got found. The boat i want to find is the boat with my accountname in. 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