Version Posted April 24, 2024 Share Posted April 24, 2024 How can I make it so that at the moment of appearing the CJ skin does not appear, if someone helps me I will be grateful addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) setPlayerSkin(source, 170) end end ) function spawn(player) --if not isElement(player) then return end if get("spawnreset") == "onSpawn" then setPlayerSkin(source, 170) spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(322)) setPlayerSkin(source, 170) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, --Cuando el jugador ingresa al servidor. function() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SW")) then --si el jugador está en el grupo spawnPlayer (source, 170, 170, 170) setTimer(spawnPlayer, 2000, 1, source, 229.37994, -1222.52002, 75.39643) --generar jugador aquí setPlayerSkin(source, 170) else spawn(source) end end) addEventHandler("onPlayerLogin", root, --cuando el jugador inicia sesión en su cuenta function() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SW")) then --si el jugador está en el grupo setPlayerMoney(source, 800) setTimer(spawnPlayer, 2000, 1, source, 229.37994, -1222.52002, 75.39643) --generar jugador aquí setPlayerSkin(source, 170)--Si funciona pero No se porque al momento de morir se vuelve la skin de cj end end) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, -- oyuncu öldüğünde function() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SW")) then --si el jugador está en el grupo setTimer(spawnPlayer, 2000, 1, source, 229.37994, -1222.52002, 75.39643) --generar jugador aquí setPlayerSkin(source, 170) else end end) addEventHandler ( "onPlayerWasted", getRootElement(), SWSpawn ) addEventHandler("onPlayerLogin", root, spawnOnLogin) Link to comment
Version Posted April 24, 2024 Author Share Posted April 24, 2024 addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) setPlayerSkin(source, 170) end end ) function spawn(player) --if not isElement(player) then return end if get("spawnreset") == "onSpawn" then setPlayerSkin(source, 170) spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(322)) setPlayerSkin(source, 170) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, --Cuando el jugador ingresa al servidor. function() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SW")) then --si el jugador está en el grupo spawnPlayer (source, 170, 170, 170) setTimer(spawnPlayer, 2000, 1, source, 229.37994, -1222.52002, 75.39643) --generar jugador aquí setPlayerSkin(source, 170) else spawn(source) end end) addEventHandler("onPlayerLogin", root, --cuando el jugador inicia sesión en su cuenta function() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SW")) then --si el jugador está en el grupo setPlayerMoney(source, 800) setTimer(spawnPlayer, 2000, 1, source, 229.37994, -1222.52002, 75.39643) --generar jugador aquí setPlayerSkin(source, 170)--Si funciona pero No se porque al momento de morir se vuelve la skin de cj end end) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, -- oyuncu öldüğünde function() if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SW")) then --si el jugador está en el grupo setTimer(spawnPlayer, 2000, 1, source, 229.37994, -1222.52002, 75.39643) --generar jugador aquí setPlayerSkin(source, 170) else end end) addEventHandler ( "onPlayerWasted", getRootElement(), SWSpawn ) addEventHandler("onPlayerLogin", root, spawnOnLogin) Link to comment
Version Posted April 25, 2024 Author Share Posted April 25, 2024 Ninguna respuesta he recibido xd bueno gracias de todas formas Link to comment
lyncon Posted April 26, 2024 Share Posted April 26, 2024 (edited) The function SetPlayerSkin has been discontinued, use the function SetElementModel Edited April 26, 2024 by lyncon Link to comment
Version Posted April 27, 2024 Author Share Posted April 27, 2024 gracias logré arreglarlo, ni siquiera era SetPlayerSkin, así que poco SetElementModel thx thank you I managed to fix it it wasn't even SetPlayerSkin so little SetElementModel 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