Xwad Posted September 3, 2015 Posted September 3, 2015 Hi is it possible to use setPlayerSkin in client side? Just beacouse i tryed and its not working:/ The debugscript says : Warning setPlayerSkin bad argumentum. What should be the problem? This is a part of the script. function joinHeavy(LocalPlayer) setPlayerSkin (localPlayer, 16) end
KariiiM Posted September 6, 2015 Posted September 6, 2015 Of course it's possible since it's an shared function and your code is totally wrong , read more about this function and im sure you can solve it by yourself
JR10 Posted September 6, 2015 Posted September 6, 2015 And use setElementModel, setPlayerSkin and setPedSkin are both deprecated.
Xwad Posted September 6, 2015 Author Posted September 6, 2015 I tryed this but its also not working:( This is a part of the script. if name == "SS-infantry1" then local player = getLocalPlayer() setElementModel( player, 16 ) triggerServerEvent("spawn_heavy", getLocalPlayer(), id) guiSetVisible(bg, false) showCursor(false)
Xwad Posted September 6, 2015 Author Posted September 6, 2015 I fixed! Thanks for all answers! The problem was the i need to set the skin after the spawn!
TAPL Posted September 6, 2015 Posted September 6, 2015 Be aware using setElementModel client side will change your skin but only you will see it, others won't. Also spawnPlayer have skin argument, you should use it instead.
Xwad Posted September 6, 2015 Author Posted September 6, 2015 ohh okay thanks! One more question: If i want to close a gui need i use destroy element? I mean foir example if i open a gui with a command and press a gui button then the gui windows will close. Just becaouse i have a problem with that.. I used that function but its not good for me i want to close the windows not just hide it.: guiSetVisible(spawnG5, false)
Xwad Posted September 6, 2015 Author Posted September 6, 2015 Cool i used destroy elemnt and its working! but the way thanks ofr you help guys!
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