Jump to content

Search the Community

Showing results for tags 'erro script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Member Title


Gang


Location


Occupation


Interests

Found 3 results

  1. queria por em meu servidor 2 empregos que usam acl uber e mecanico ambos estao localizados na msm agencia consegui fazer com 1 porem quando tento adicionar outro nao funciona Scrip abaixo --[[ ><><><><><><><><><><><><><><><><><><><>< >< Pegar Trabalho >< ><><><><><><><><><><><><><><><><><><><>< --]] function Pegar_Emprego (source, Trab, Level, Hab) local Trabalho = getElementData ( source, "Emprego" ) or "Desempregado" local Habilicao = getElementData ( source, "DNL:Categoria("..Hab..")") local Level_Player = tonumber(getElementData(source, "Level")) or 0 if Level_Player >= tonumber(Level) then if Trabalho == Trab then triggerClientEvent(source, "addNotification", root, "INFO: Você Já Trabalha Como "..Trab.."", "info") return end if Habilicao == false then triggerClientEvent(source, "addNotification", root, "Erro: Você Não Tem Habilitação ("..Hab..") e Não Pode Trabalhar Como ("..Trab..")", "erro") return end setElementData ( source, "Emprego", Trab ) triggerClientEvent(source, "addNotification", root, "INFO: Você Agora Trabalha de "..Trab.."", "info") else triggerClientEvent(source, "addNotification", root, "Erro: Seu Level é Muito Baixo e Você Não Pode Trabalhar Como "..Trab.."", "erro") end end addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Pegar_Emprego (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name local Emprego = getElementData ( playerSource, "Emprego" ) if Emprego == "Mecanico" then aclGroupAddObject (aclGetGroup("Mecanico"), "user."..accName) outputChatBox ("Parabéns! Agora você está trabalhando de Mecanico!", playerSource, 0, 255, 0,true) outputChatBox ("Va para o T marcado no mapa proximo a DP!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Sair_ACL (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Mecanico" ) ) then -- Does he have access to Admin functions? aclGroupRemoveObject (aclGetGroup("Mecanico"), "user."..accName) outputChatBox ("Você não está trabalhando de Mecanico!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pedir_Demissao", true) addEventHandler("DNL:Pedir_Demissao", root, Sair_ACL) addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Pegar_Emprego (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name local Emprego = getElementData ( playerSource, "Emprego" ) if Emprego == "Uber" then aclGroupAddObject (aclGetGroup("Uber"), "user."..accName) outputChatBox ("Parabéns! Agora você está trabalhando de Uber!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pegar_Emprego", true) addEventHandler("DNL:Pegar_Emprego", root, Pegar_Emprego) function Sair_ACL (playerSource) local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Uber" ) ) then -- Does he have access to Admin functions? aclGroupRemoveObject (aclGetGroup("Uber"), "user."..accName) outputChatBox ("Você não está trabalhando de Uber!", playerSource, 0, 255, 0,true) end end addEvent("DNL:Pedir_Demissao", true) addEventHandler("DNL:Pedir_Demissao", root, Sair_ACL) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Demissao Trabalho >< ><><><><><><><><><><><><><><><><><><><>< --]] function Pedir_Demissao (source) local Trabalho = getElementData ( source, "Emprego" ) or "Desempregado" if Trabalho == "Desempregado" then triggerClientEvent(source, "addNotification", root, "Erro: Você não está empregado para se demitir.", "erro") return end setElementData ( source, "Emprego", "Desempregado" ) triggerClientEvent(source, "addNotification", root, "Sucesso: Você Se Demitiu Do Emprego de "..Trabalho.."", "sucesso") end addEvent("DNL:Pedir_Demissao", true) addEventHandler("DNL:Pedir_Demissao", root, Pedir_Demissao)
  2. tem algo errado aqui rapaziada? have something wrong in the script? local x,y,z,dim,inter,rot = unpack(fromJSON(v.pos)); Erro no Console WARNING: fv_bank\server.lua:33: Bad argument @ 'fromJSON' [Expected string at argument 1, got nil] [2021-04-23 14:41:42] ERROR: fv_bank\server.lua:33: bad argument #1 to 'unpack' (table expected, got nil) [2021-04-23 14:41:48] WARNING: fv_bank\server.lua:33: Bad argument @ 'fromJSON' [Expected string at argument 1, got nil] [DUP x3] [2021-04-23 14:41:48] ERROR: fv_bank\server.lua:33: bad argument #1 to 'unpack' (table expected, got nil) [DUP x3](editado)
  3. Eu tava fazendo um painel que quando a pessoa clicava no botão tocava musica so que começou a bugar então resolvir pedir ajudar aqui ja que você se mt pro em programação Script: function showPanellr(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("surpresa")) then ---So Mude "PCC" Grupo que vai poder abrir o painel ! triggerClientEvent(thePlayer, "painelrota", getRootElement()) end end function onResStartlr() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "k", "down", showPanellr)------"K" Botao Para Abrir O Painel end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStartlr) function onPlayerJoinlr() bindKey(source, "k", "down", showPanellr)------"K" Botao Para Abrir O Painel end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoinlr) function cleanAlllr(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "k", "down", showPanellr)------"K" Botao Para Abrir O Painel end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAlllr) veh = {} function playTheSound() soundinside = playSound3D("natal.mp3", source, 255, 255, 255,true) setElementInterior(soundinside, 2) setElementDimension(soundinside, 5) setSoundVolume(soundinside, 1) setSoundMinDistance(soundinside, 17) setSoundMaxDistance(soundinside, 100) soundout = playSound3D("natal.mp3", source, 255, 255, 255,true) setSoundVolume(soundout, 1) setSoundMinDistance(soundout, 17) setSoundMaxDistance(soundout, 100) end Erro: WARNING: [managers]\PainelSurpresa\server.lua:3: Bad argument @ 'isObjectInACLGroup' [Expected acl-group at argument 2, got boolean]
×
×
  • Create New...