Jump to content

help me with select skin


AnDReJ98

Recommended Posts

Hi Guys

There is a problem when I choose the skin

For example, I chose ID: 46 and i finshed

Other players see my skin CJ skin ID: 0 not my skin

only me i can see my skin

whats problem here?

this client side

  
local localPlayer = getLocalPlayer() 
  
left = guiCreateStaticImage(0.07,0.60,0.15,0.30,"images/left.png",true) 
right = guiCreateStaticImage(0.78,0.60,0.15,0.30,"images/right.png",true) 
  
function goRight(player) 
  local newSkin = getElementModel (localPlayer) + 1 
  while not setElementModel (localPlayer,newSkin) do newSkin = newSkin + 1 end 
end 
addEventHandler ( "onClientGUIClick",right,goRight, false ) 
  
function goLeft(player) 
  local newSkin = getElementModel (localPlayer) - 1 
  while not setElementModel (localPlayer,newSkin) do newSkin = newSkin - 1 end 
end 
addEventHandler ( "onClientGUIClick",left,goLeft, false ) 
  

Link to comment
You need to use setElementModel serverside, use triggerServerEvent in the gui script to send the skin to the server.

how?

please help me

thank you

Is this very difficult to understand?

or you just waiting for ready code?

lazy people!

You need to use setElementModel serverside, use triggerServerEvent in the gui script to send the skin to the server.
Link to comment
You need to use setElementModel serverside, use triggerServerEvent in the gui script to send the skin to the server.

how?

please help me

thank you

Is this very difficult to understand?

or you just waiting for ready code?

lazy people!

You need to use setElementModel serverside, use triggerServerEvent in the gui script to send the skin to the server.

shut up

if you have any help

help me

or go out from topic :redhotevil:

Link to comment
  
triggerServerEvent() 
addEvent() 
addEventHandler() 
  

That's what ya need.

I'm not writing the whole code for you though

i know all this

setElementModel for one skin

like this

    triggerServerEvent ("skin", getLocalPlayer()) 
  

  
addEvent( "skin", true ) 
function setSkin () 
    setElementModel ( source, 46 ) 
end 
addEventHandler ( "skin", getRootElement(), setSkin ) 
  

but setElementModel with all skin when Button go right and lift

any help

Link to comment
  
triggerServerEvent() 
addEvent() 
addEventHandler() 
  

That's what ya need.

I'm not writing the whole code for you though

i know all this

setElementModel for one skin

like this

    triggerServerEvent ("skin", getLocalPlayer()) 
  

  
addEvent( "skin", true ) 
function setSkin () 
    setElementModel ( source, 46 ) 
end 
addEventHandler ( "skin", getRootElement(), setSkin ) 
  

but setElementModel with all skin when Button go right and lift

any help

  
-- Client Side  
triggerServerEvent ("skin", getLocalPlayer(),getElementModel (getLocalPlayer())) 
-- Server Side 
addEvent( "skin", true ) 
function setSkin (theSkin) 
if not theSkin then theSkin = math.random(0,100) end 
    setElementModel ( source, theSkin ) 
end 
addEventHandler ( "skin", getRootElement(), setSkin ) 
  

Link to comment
  
triggerServerEvent() 
addEvent() 
addEventHandler() 
  

That's what ya need.

I'm not writing the whole code for you though

i know all this

setElementModel for one skin

like this

    triggerServerEvent ("skin", getLocalPlayer()) 
  

  
addEvent( "skin", true ) 
function setSkin () 
    setElementModel ( source, 46 ) 
end 
addEventHandler ( "skin", getRootElement(), setSkin ) 
  

but setElementModel with all skin when Button go right and lift

any help

  
-- Client Side  
triggerServerEvent ("skin", getLocalPlayer(),getElementModel (getLocalPlayer())) 
-- Server Side 
addEvent( "skin", true ) 
function setSkin (theSkin) 
if not theSkin then theSkin = math.random(0,100) end 
    setElementModel ( source, theSkin ) 
end 
addEventHandler ( "skin", getRootElement(), setSkin ) 
  

this work

thanks you so much

you are the best scripter :D

Link to comment

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