Leinad Raiz Posted November 18, 2021 Share Posted November 18, 2021 I have a phone script so when a person calls a mechanic the script identifies which people are in the mechanic acl to notify them that someone needs a mechanic only he uses an (Acl) to identify and I have an agency script that he uses getplayerelement so I was wondering how do I replace the acl by element: elseif type == "mecanico" then outputChatBox("#00BFFFVocê chamou o mecânico, aguarde", client, 255, 255, 255, true) for _, player in ipairs(getElementsByType("player")) do if isPlayerInACL(player, (Grupo2)) then outputChatBox(getPlayerName(client).." precisa de um mecânico em "..city, player, 255, 255, 255, true) displayServerMessage(player, removeHex(getPlayerName(client)).." precisa de um mecânico em "..city, "warning") blip[client] = createBlipAttachedTo(client, 27) setElementVisibleTo(blip[client], root, false) setElementVisibleTo(blip[client], player, true) timer[client] = setTimer(function(b) if isElement(b) then destroyElement(b) end end, 120000, 1, blip[client]) end end That's the mechanic, this one is the agency script when you get the job: function MecanicoAirNew () local Level = getElementData ( source, "Level" ) or 0 if Level >= 0 then TudoInvisivel () setElementVisibleTo ( Mecanico, source, true ) setElementData ( source, "AirNew>Encaminhamento", "Mecanico" ) outputChatBox ( "Você foi aceito no Emprego de Mecânico", source, 255, 255, 255, true ) outputChatBox ( "Para Iniciar os Serviços siga o Checkpoint Vermelho em seu Radar", source, 255, 255, 255, true ) setElementData ( source, "Emprego", false ) end end addEvent( "Encaminhar>Mecanico", true ) addEventHandler( "Encaminhar>Mecanico", getRootElement(), MecanicoAirNew ) Link to comment
Administrators Tut Posted November 18, 2021 Administrators Share Posted November 18, 2021 Closing this as a duplicate - it's ok to create two threads in two different languages if it's to translate a tutorial, but when asking for help we suggest you only create 1 thread so that you don't receive replies on both threads, where users might not know what you've already tried or what advice has already been given. Link to comment
Recommended Posts