Jump to content

HELP - check name and ID by table


Ryosuke

Recommended Posts

 

Hi, I'd like some help solving the problems in my script. it substitutes objects per table, but I can not verify the name and ID and give the correct functions to run everything, someone to help?

Garage_OBJ_COL = {
    {"garage_1.col",1484},
    {"garage_2.col",1485},
}


function replacemodels(player)
for i,OBJ in ipairs(Garage_OBJ_COL) do
table.insert (engineLoadCOL,{OBJ[1]})
table.insert (engineReplaceCOL,{OBJ[2]})
end
end
 addEventHandler("onResourceStart",root,replacemodels)

Edited by Elvis Willian
Link to comment
  • Moderators
Garage_OBJ_COL = {
    {"garage_1.col",1484},
    {"garage_2.col",1485},
}

function replacemodels(player)
	for i,v in ipairs(Garage_OBJ_COL) do
		engineReplaceCOL( engineLoadCOL(v[1]), v[2] )
	end
end
 addEventHandler("onClientResourceStart",resourceRoot,replacemodels)

It's a client-side code.

Edited by DNL291
fix
Link to comment
  • 2 months later...
On 04/06/2018 at 19:31, DNL291 said:

Garage_OBJ_COL = {
    {"garage_1.col",1484},
    {"garage_2.col",1485},
}

function replacemodels(player)
	for i,v in ipairs(Garage_OBJ_COL) do
		engineReplaceCOL( engineLoadCOL(v[1]), v[2] )
	end
end
 addEventHandler("onClientResourceStart",resourceRoot,replacemodels)

It's a client-side code.

thanks bro :x

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