Jump to content

SetPlayerSkin in client side


Xwad

Recommended Posts

Posted

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 
  

Posted

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

Posted

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) 
  

Posted

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.

Posted

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)

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...