Jump to content

[Error]Comando staff


Recommended Posts

Hola tengo un error puse un comando para los staff que hace que se te ponga un skin seas inmortal y se te ponga un skin pero entonces un player que no sea admin lo pone y le sirve :? y no se que hacer aqui esta el script

function togglestaffMode(thePlayer) 
local account = getPlayerAccount(thePlayer) 
if (not account or isGuestAccount(account)) then return end 
local accountName = getAccountName(account) 
if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then 
    if getElementData(thePlayer,"invincible") then 
        setElementData(thePlayer,"invincible",false) 
        outputChatBox("El staff se ha desconectado.",thePlayer,255,255,255) 
    else 
        setElementData(thePlayer,"invincible",true) 
        outputChatBox("El staff se ha conectado.",thePlayer,255,255,255) 
        end 
    end 
end 
addCommandHandler("gostaff",togglestaffMode) 

Server2

function createTeamsOnStart () 
        teamstaff = createTeam ( "STAFF", 255, 255, 255 ) 
         
end 
addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) 
  
   function lol ( player, command ) 
    setPlayerTeam ( player, teamstaff ) 
    setPlayerSkin(player, 217) 
         
end 
addCommandHandler ( "gostaff", skin ) 

client

  

Link to comment
  • 4 weeks later...
  • Recently Browsing   0 members

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