Jump to content

me ayudan con esto??


TarkFox

Recommended Posts

hola, hoy descargue de la comunidad este panel https://community.multitheftauto.com/ind ... ls&id=8770 ahi dice que edite unas lineas de un archivo llamado staff.lua nose como se hacia pero intente como creia, los reportes llegan y todo bien pero no me abre el panel de administracion, me ayudan??

Staff.lua

local staffTable = 
{ 
--You can add admins manually here 
-- {"Account Name"}, 
--Eg. 
{"Kunal"}, 
} 
  
--=========================================Don't edit anything below this or you might break it=========================================-- 
  
local staffTeam = createTeam("Staff", 225, 225, 225) 
local unoccupiedTeam = createTeam("Unoccupied", 225, 225, 0) 
  
addEventHandler("onResourceStart", root, 
    function() 
        for i=1, #staffTable do 
            local staffList = dbPoll(dbQuery(adminDB, "SELECT * FROM staffList WHERE staff=?", staffTable[i][1]), -1) 
            if (#staffList == 0) then 
                dbExec(adminDB, "INSERT INTO staffList(staff) VALUES(?)", staffTable[i][1]) 
            end 
        end 
    end 
) 
  
addEventHandler("onPlayerLogin", root, 
    function() 
        local staffName = dbPoll(dbQuery(adminDB, "SELECT * FROM staffList WHERE staff=?", getAccountName(getPlayerAccount(source))), -1) 
        if (not (#staffName == 0)) then 
            setElementData(source, "isPlayerStaff", true) 
            outputChatBox("Logged In as admin", source, 225, 225, 225) 
        end 
    end 
) 
  
addCommandHandler("gostaff",  
    function(plr) 
        local isStaff = getElementData(plr, "isPlayerStaff") 
        if (isStaff) then 
            setPlayerTeam(plr, getTeamFromName("Staff")) 
            setElementModel(plr, 217) 
            outputChatBox("Entered staff mode", plr, 225, 225, 225) 
        else 
            return 
        end 
    end 
) 
  

Link to comment
ahh si, ahi donde dice account name, si lo cambie y nada..

En las primeras lineas:

local staffTable = 
{ 
--You can add admins manually here 
-- {"Account Name"}, 
--Eg. 
{"Kunal"}, 
} 

Añades el nombre de tu cuenta, por ejemplo:

local staffTable = 
{ 
--You can add admins manually here 
-- {"Account Name"}, 
--Eg. 
{"Alexs_Steel"}, 
{"TarkFox"}, 
{"Fulano"} 
} 

Haría que las cuentas 'Alexs_Steel', 'TarkFox' y 'Fulano' pudiesen abrir el panel.

*Luego de eso, debes iniciar el recurso y loggearte (en ese orden) para que los cambios afecten a tu cuenta.

Link to comment
  • Recently Browsing   0 members

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