amirmahdi Posted May 1, 2021 Share Posted May 1, 2021 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 comment
Tekken Posted May 1, 2021 Share Posted May 1, 2021 (edited) Model is missing in second setElementModel Edited May 1, 2021 by Tekken Typo Link to comment
amirmahdi Posted May 3, 2021 Author Share Posted May 3, 2021 On 01/05/2021 at 15:40, Tekken said: Model is missing in second setElementModel So what do I do? Link to comment
Tekken Posted May 3, 2021 Share Posted May 3, 2021 setElementModel (thePlayer, tonumber(getElementData(accSys:getPlayerAcc(thePlayer), "cSkin"))) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now