Jump to content

[Ayuda]Skin Privado por ACL


elchinooo98

Recommended Posts

eso es lo que no encuentro en el freeroam :c mi idea era borrarlo cosa que cuando pusieran /ss 59 nada pasara pero no la encuentro esa funcion :/ probe esto que encontre en un topic de la comu pero no me funciona

function checkskin( posX, posY, posZ, spawnRotation, theTeam, theSkin, theInterior, theDimension ) 
if not isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
if theSkin == 59 then 
killPed(source) 
end 
end 
end 
addEventHandler("onPlayerSpawn",getRootElement(),checkskin) 

Link to comment
eso solo funcionara cuando el jugador spawnea

y como lo tendria que dejar para que nadie lo pueda usar solo los del acl?

Te voy a decir una tontería, pero alomejor vale de algo... intenta que cuando un user ponga /ss 0 le ejecute la función killPed, pero si eres admin ejecute la línea de la vida (nunca hize esto pero si no recuerdo mal tendrás que usar if.

Link to comment

en el resource freeroam hay un archivo llamdo fr_server.lua abrelo y dirigete a la linea 217

hay encontraras la funcion setMySkin

reemplaza toda esa funcion por esto

function setMySkin(skinid) 
    if isPedDead(source) then 
        local x, y, z = getElementPosition(source) 
        if isPedTerminated(source) then 
            x = 0 
            y = 0 
            z = 3 
        end 
        local r = getPedRotation(source) 
        local interior = getElementInterior(source) 
        spawnPlayer(source, x, y, z, r, skinid) 
        setElementInterior(source, interior) 
        setCameraInterior(source, interior) 
    else 
     if skinid == 59 then 
         if isObjectInACLGroup ("user."..getAccountName( getPlayerAccount (source) ), aclGetGroup ( "Admin" ) ) then 
          setElementModel(source, skinid) 
          setElementHealth(source, 100) 
         else 
          outputChatBox("Este skin es solo para Administradores", source, 100,0,0) 
          end 
      else 
        setElementModel(source, skinid) 
        setElementHealth(source, 100) 
      end 
    end 
    setCameraTarget(source, source) 
    setCameraInterior(source, getElementInterior(source)) 
end 

Link to comment
en el resource freeroam hay un archivo llamdo fr_server.lua abrelo y dirigete a la linea 217

hay encontraras la funcion setMySkin

reemplaza toda esa funcion por esto

function setMySkin(skinid) 
    if isPedDead(source) then 
        local x, y, z = getElementPosition(source) 
        if isPedTerminated(source) then 
            x = 0 
            y = 0 
            z = 3 
        end 
        local r = getPedRotation(source) 
        local interior = getElementInterior(source) 
        spawnPlayer(source, x, y, z, r, skinid) 
        setElementInterior(source, interior) 
        setCameraInterior(source, interior) 
    else 
     if skinid == 59 then 
         if isObjectInACLGroup ("user."..getAccountName( getPlayerAccount (source) ), aclGetGroup ( "Admin" ) ) then 
          setElementModel(source, skinid) 
          setElementHealth(source, 100) 
         else 
          outputChatBox("Este skin es solo para Administradores", source, 100,0,0) 
          end 
      else 
        setElementModel(source, skinid) 
        setElementHealth(source, 100) 
      end 
    end 
    setCameraTarget(source, source) 
    setCameraInterior(source, getElementInterior(source)) 
end 

Gracias alex me sirvioo :)

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...