Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 16/03/24 in all areas

  1. Oi @#DeltaSCR, vi o tópico e infelizmente não entendi como aplicar. Sou novo em Lua/MTA, desculpe se a pergunta é besta mas segue o código: addEventHandler ("onPlayerJoin", root, function () showChat (source, false) end) function onChat(message, messageType) onChat(message, messageType) if string.find(message, '/showChat') then -- Searches for the string 'kill' in the message sentif string.find(message, 'kill') then -- Searches for the string 'kill' in the message sent cancelEvent()() outputChatBox("#FF0000[ERRO] #FFFFFF Chat desativado! Use o somente o chat local!", source, 255, 255, 255, true) endend end --End of the functionend --End of the function addEventHandler("onPlayerChat", root, onChat)("onPlayerChat", root, onChat)
    1 point
  2. Nevermind, figured it out in the end.
    1 point
  3. Hi, Would not the attached players follow the vehicle when switching dimension or interior if player is set as children of the vehicle. I'm not sure if it works, could be worth to try. Maybe attachElements is already setting element as children ... -- NOT TESTED function attachPlayerToVehicle(player, vehicle) if not getElementType(player) == "player" then return end if not getElementType(vehicle) == "vehicle" then return end attachElements(player, vehicle) setElementParent(player, vehicle) end edit : I tried with runcode, attached myself to a vehicle, set myself children to this vehicle, set a different interior and dimension to the vehicle and I was following it. I tried also wihout setting myself as children and I was not following. You whole code can only be a short function You could also override attachElements to handle any case by default. Have a nice day
    1 point
×
×
  • Create New...