Jump to content

isElementStreamedIn and Peds


Recommended Posts

Hi

so what i currently have is this.

addEventHandler("onClientResourceStart", getResourceRootElement(),  
    function()  
        testPed = createPed(7, -2720.26, 498, 7.07) 
         
        outputChatBox(tostring(isElementStreamedIn(testPed))) 
    end 
) 

Im trying to start on a nametag system but this is causing me problems. I need peds to be inserted into a table because my peds have nametags too. I just set up this test code, to test out things.

[Yes, the ped is right next to me]

Any ideas?

Link to comment
  • Moderators
addEventHandler("onClientRender",root, 
    function() 
        local allPeds = getElementsByType("ped") 
        for i=1,#allPeds do 
        local ped = allPeds[i] 
        if isElementStreamedIn(ped) then 
          
        end 
    end 
end) 

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