Sign in to follow this  
Ryosuke

HELP - check name and ID by table

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.