1LoL1 Posted February 10, 2015 Share Posted February 10, 2015 Please how to fix this script? not work local spawnX, spawnY, spawnZ = 2494.6000976563, -1692.5, 25.39999961853 local skin = 287 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) local spawnX, spawnY, spawnZ = 2494.6000976563, -1692.5, 25.39999961853 local skin = 287 function deadHandler() spawnPlayer(source, spawnX, spawnY, spawnZ, spawnSkin) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerWasted", getRootElement(), deadHandler) Link to comment
Mr_Moose Posted February 10, 2015 Share Posted February 10, 2015 Check the following: Do /debugscript 3 and see if you get any errors Make sure this is running on the server side (type="server" in meta.xml) Line 10 and 11 does the same as 1 and 2, remove 10 and 11. Link to comment
1LoL1 Posted February 10, 2015 Author Share Posted February 10, 2015 Check the following: Do /debugscript 3 and see if you get any errors Make sure this is running on the server side (type="server" in meta.xml) Line 10 and 11 does the same as 1 and 2, remove 10 and 11. only but i want only when i joined the server skin - 287 and when i dead i spawn with skin 287. Link to comment
Ryancit2 Posted February 10, 2015 Share Posted February 10, 2015 There you go: local spawnX, spawnY, spawnZ = 2494.6000976563, -1692.5, 25.39999961853 local skin = 287 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ, 90, skin) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin", root, joinHandler) function deadHandler() fadeCamera(source, true) setCameraTarget(source, source) setTimer(spawnPlayer, 2000, 1, source, spawnX, spawnY, spawnZ, 90, skin) end addEventHandler("onPlayerWasted", root, deadHandler) To set skin with spawnPlayer function, you gotta pass another optional argument "Set Rotation" which comes before setting skin, then you can set the model ID which will be applied after spawning. Link to comment
1LoL1 Posted February 10, 2015 Author Share Posted February 10, 2015 There you go: local spawnX, spawnY, spawnZ = 2494.6000976563, -1692.5, 25.39999961853 local skin = 287 function joinHandler() spawnPlayer(source, spawnX, spawnY, spawnZ, 90, skin) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin", root, joinHandler) function deadHandler() fadeCamera(source, true) setCameraTarget(source, source) setTimer(spawnPlayer, 2000, 1, source, spawnX, spawnY, spawnZ, 90, skin) end addEventHandler("onPlayerWasted", root, deadHandler) To set skin with spawnPlayer function, you gotta pass another optional argument "Set Rotation" which comes before setting skin, then you can set the model ID which will be applied after spawning. Thanks you very much man!!! 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