Jump to content

[HELP] Custom skin


jyrno42

Recommended Posts

I wanted to test out the custom skin texture feature and i have a problem.

My testing script has two scripts.

server.lua

-- A copy from wiki, just for testing.
function joinHandler()
local x = 1959.55
local y = -1714.46
local z = 10
spawnPlayer(source, x, y, z)
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox("Welcome to My Server", source)
setPedSkin ( source, 7 )
end
addEventHandler("onPlayerJoin", getRootElement(), joinHandler)

client.lua

function modStuff()
local txd_7 = engineLoadTXD ( ":HELL/7.txd" )
engineImportTXD ( txd_7, 7 )		
outputChatBox("IMODS")
end
 
 
addEventHandler( "onClientResourceStart", getRootElement( ),
   function ( startedRes )
       modStuff();
   end
);

Both of the messages are showing, and debug script doesn't have anything. But I spawn with the default version of skin 7.

BTW: Yes the skin file is in my meta.xml .

Link to comment

None of the engine functions work well and there is no theory that fixes them, they either work or not. You may have many problems with them all the time. The most annoying thing is white skin which has no texture loaded at all.

Try to spawn player once he's downloaded and replaced his skin texture (onClientResourceStart) or change his skin ID once he's texture was changed (yes, the same ID that he spawned with).

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