xFabel

getElementModel does not find the event

Recommended Posts

hey, i have a question why getElementModel can't find a skinid when he changes it?, i used some setElementModel. and could not find the skin number (getElementModel) from createPed

Functions.skinID = {280,281,282,265,266,267,283,284,285,286,288}
skin = createPed ( Functions.skinID[1], 2749.7502441406,-2232.7170410156,61.727611541748,60 )


function skins()
 setElementModel(skin,Functions.skinID[math.random(#Functions.skinID)])
 end
addCommandHandler("changeskin",skins)




local theSkin = getElementModel( skin )	
function test()
print(theSkin)
end
addCommandHandler("skin",test)

 

Share this post


Link to post

u need to update function with ped

it should be:
 

local theSkin
function test()
	theSkin = getElementModel( skin )	
	print(theSkin)
end

 

  • Like 1

Share this post


Link to post
7 hours ago, nikitafloy said:

u need to update function with ped

it should be:
 


local theSkin
function test()
	theSkin = getElementModel( skin )	
	print(theSkin)
end

 

i am trying to use theSkin event in the table and it did not work
I did this

function test ()
local theSkin = getElementModel (localPlayer)
end


however problem is that there was no event in theSkin when i inserted it into the function
I did it like this

local function test ()
local theSkin = getElementModel (localPlayer)
end


same thing I just want to enter getElementModel inside the function and make it read in the table how?

btw table under function test

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

  • Recently Browsing   0 members

    No registered users viewing this page.