Jump to content

[Solved] Table,loop and render issue


Perfect

Recommended Posts

Hello Everyone, after a long time. :)

I just found my old script somewhere deep inside my computer.

I am trying to modify it such that it can create as many peds as i want.

but the problem is when i run it, my game almost froze and there are no errors/warnings debugscript.

Script:

  
--Table 
Pos =   {   {-1375.30627, -234.72827, 14.14844}, 
            {-1375.30627, -234.72827, 14.14844}, 
            {-1375.30627, -234.72827, 14.14844}, 
            {-1375.30627, -234.72827, 14.14844}, 
            ... 
        } 
... 
--Event 
addEventHandler("onClientRender", root, 
function() 
    ... 
    for i=...,... do 
        local _i = i*(math.pi/180) 
        for Ri=1,10 do --This thing is maybe calling on every frame, How to fix it ? 
            local myPed = createPed(23,Pos[Ri][1],Pos[Ri][2],Pos[Ri][3]) 
            setPedCameraRotation(myPed, ....+Pos[Ri][1], ...+Pos[Ri][2],Pos[Ri][1], Pos[Ri][2])) 
        end 
    end 
end) 
  

Can someone please help me ?

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