Jump to content

emergency help !


Recommended Posts

Hi friends, I have a small problem

In the console it gives this warning

Bad argument @ 'setElementModel' [Expected element at argument 1, got number '100']

Which corresponds to the following line

setElementModel (tonumber(getElementData(accSys:getPlayerAcc(thePlayer), "cSkin")))

 

cods

---- admin duty skin ----
addCommandHandler("a209",
function ( thePlayer, command )
    if tonumber(getElementData(accSys:getPlayerAcc(thePlayer), "pAdmin")) < 10 then
    return false
	end
	setElementData(accSys:getPlayerAcc(thePlayer), "dSkin", 209)
	setElementModel (thePlayer, 209)
    
end)
 
--- admin off skin ---- 
addCommandHandler("o209",
function ( thePlayer, command )
    if tonumber(getElementData(accSys:getPlayerAcc(thePlayer), "pAdmin")) < 10 then
	
    return false
	
	end
	setElementModel (tonumber(getElementData(accSys:getPlayerAcc(thePlayer), "cSkin")))
	
    
end)

in part of ---- admin duty skin ----

There is no problem in the ---- admin duty skin ---- part

but

In the second part, --- admin off skin ----, when I order, Warning comes

 

The second part must set the player model from the part of cSkin

But it does not and gives high warning

Sorry for the bad English language

Please help me, my only hope is you

 

 

Link to post
On 01/05/2021 at 15:40, Tekken said:

Model is missing in second  setElementModel 

So what do I do?

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.

×
×
  • Create New...