Jump to content

Matching name and elementdata


villr

Recommended Posts

Posted (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 by Guest
Posted

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.

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...