Jump to content

Como Consigo Criar Um Script Para Esconder O ID Do Staff Para Os Players


Recommended Posts

function toggleInvisibility(thePlayer)
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ("Staff")) then
        local enabled = getElementData(Player, "ID")
        if (enabled == true) then
            setElementAlpha(Player, 0)
            setElementData(Player, "reconx", false)
            outputChatBox (" -> Escondeu O ID", thePlayer)
            setElementData(Player, "invisible", false)
        elseif (enabled == false or enabled == nil) then
            setElementAlpha(Player, 0)
            setElementData(Player, "reconx", true)
            outputChatBox (" -> Mostrou O ID", thePlayer)
            setElementData(Player, "invisible", true)
        else
        end
        outputChatBox ("Acesso negado", thePlayer)
        else
    end
end    
addCommandHandler("IDV", toggleInvisibility)
Link to comment
function toggleInvisibility(thePlayer)
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ("Staff")) then
        local enabled = getElementData(Player, "ID")
        if (enabled == true) then
            setElementAlpha(Player, 0)
            setElementData(Player, "reconx", false)
            outputChatBox (" -> Escondeu O ID", thePlayer)
            setElementData(Player, "invisible", false)
        elseif (enabled == false or enabled == nil) then
            setElementAlpha(Player, 0)
            setElementData(Player, "reconx", true)
            outputChatBox (" -> Mostrou O ID", thePlayer)
            setElementData(Player, "invisible", true)
        else
        end
        outputChatBox ("Acesso negado", thePlayer)
        else
    end
end    
addCommandHandler("IDV", toggleInvisibility)
Link to comment
  • Moderators

Você não está usando o elemento do jogador 'thePlayer', em vez disso, está Player que é um valor nulo. O código também parece ter problemas de lógica.
Use o comando debugscript 3 sempre que tiver problemas e ao postar no fórum, cole seu código dentro da formatação correta no botão Code <>

  • Like 1
  • Confused 1
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...