Jump to content

Blaack

Members
  • Posts

    194
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Blaack

  1. Exemplo que está na wiki: -- define our chat radius local chatRadius = 20 --units -- define a handler that will distribute the message to all nearby players function sendMessageToNearbyPlayers(message, messageType) -- we will only send normal chat messages, action and team types will be ignored if messageType == 0 then -- get the chatting player's position local posX1, posY1, posZ1 = getElementPosition(source) -- loop through all player and check distance for id, player in ipairs(getElementsByType("player")) do local posX2, posY2, posZ2 = getElementPosition(player) if getDistanceBetweenPoints3D(posX1, posY1, posZ1, posX2, posY2, posZ2) <= chatRadius then outputChatBox(message, player) end end end -- block the original message by cancelling this event cancelEvent() end -- attach our new chat handler to onPlayerChat addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers ) Se ler a wiki, conseguirá fazer facil... tem vários exemplos lá!
  2. use localPlayer alias de source! ou mande seu código!
  3. Já tentou ver se há algum bug no /debugscript 3?
  4. Não entendi! Assim? function DNL_Hud() for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end dxDrawRectangle(x*835, y*50, x*521, y*34, tocolor(32, 32, 33), false) dxDrawRectangle(x*835, y*50, x*521, y*34, tocolor(150, 16, 148), false) dxDrawLine(x*835, y*74, x*1356, y*74, tocolor(0, 0, 0), x*2, false) dxDrawLine(x*998, y*73, x*998, y*40, tocolor(0, 0, 0), x*1, false) dxDrawLine(x*1170, y*74, x*1170, y*41, tocolor(0, 0, 0), x*1, false) 
  5. function BloquearChat(message) outputChatBox("#FF0000[ERRO] #FFFFFF Chat desativado! Use o somente o chat local! Apertando a letra 'U' ", source, 255, 255, 255, true) cancelEvent() end addEventHandler("onPlayerChat", root, BloquearChat) Tenta ai (Freeroam desativado please)
  6. Creio que ai não está definindo quem é o elemento source. Tenta ai : (Nao testado) local timer = 500 function desaparecer() if getElementType(source) == "vehicle" then setTimer(destroyElement, timer, 1, source) end end addEventHandler("onVehicleExplode",getRootElement(), desaparecer)
  7. Mande o erro que aparece no /debugscript, e mande o código do script aqui, para que posssamos ajuda-lo
  8. Exatamente oque o lord falou, você não deve ter ligado o DxMessages.
  9. Quais erros da no debug brother ?
  10. A Certo, lerdeza minha kkk desculpe
  11. Eu usei o setCameraMatrix para fazer uma "cutscene"
  12. Cara, só te olhar estou vendo uns erros; este script voce fez do 0 ? eu te recomendo recomeçar...
  13. Este código quem fez foi você ? e você quer acl pra que ?
  14. Para aparecer o blip do player que solicitou você tem que usar as functions setElementData getElementData createBlipAttachedTo
  15. Caso não consiga, mande seu código
×
×
  • Create New...