Tommy.

Members
  • Content Count

    181
  • Joined

  • Last visited

  • Days Won

    1

Tommy. last won the day on December 19 2019

Tommy. had the most liked content!

Community Reputation

64 Popular

About Tommy.

  • Rank
    Mark
  • Birthday 03/05/2001

Details

  • Gang
    INFINITY PLAY
  • Location
    Blumenau - Brazil
  • Occupation
    Developer/ Lua, Php, Html, Js, Css, Mysql
  • Interests
    Knowledge

Recent Profile Visitors

1,684 profile views
  1. A solução está na resposta, kk function fix (playerSource) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup ("vip")) then local theVehicle = getPedOccupiedVehicle (playerSource) if theVehicle and getVehicleController ( theVehicle ) == playerSource then fixVehicle (theVehicle) outputChatBox ("" , thePlayer) end end end addCommandHandler ("fix" , fix)
  2. Aquela verificação de veh/source é pra caso a função ser chamada pelo o onResourceStart, caso ela for chamada por la, o source não vai ser o vehicle. Esse monte de propriedades foi porque eu peguei de um script que tinha no meu server de velocidade real, dai pro carro n ficar todo bugado, setava esse monte. E verdade, era pra ser vehicle, errei nisso, kk
  3. Bom, sem nenhum código fica um pouco difícil de ajudar, Mesmo para logar não precisando de permissão, sabe se o painel de login está com as permissão na acl?
  4. Use a opção "CODE" para ficar o fácil entendimento do seu código.
  5. Ta na mão, rs groupeName = "Blitz" function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end function openRender(source) local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("BOPE")) or isObjectInACLGroup("user."..accName, aclGetGroup("PMRJ")) then triggerClientEvent(source, "renderBlitz", root) end end addCommandHandler("blitz", openRender) function createCone() local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(1237, x, y, z - 1.2) end addEvent("createCone",true) addEventHandler("createCone", root, createCone) function createBarrier() local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(1228, x, y, z - 0.6, 0, 0, rz + 90) end addEvent("createBarrier",true) addEventHandler("createBarrier", root, createBarrier) colShape = { byObject = {} } function createStinger(source) local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(2899, x, y, z - 0.9, 0, 0, rz + 90) colShape.byObject["stinger"] = createColRectangle(x - 2, y - 2, 4.0, 4.0 ) end addEvent("createStinger",true) addEventHandler("createStinger", root, createStinger) addEventHandler("onElementColShapeHit", root, function(colShapeHit) if colShapeHit == colShape.byObject["stinger"] then if getElementType(source) == "vehicle" then setVehicleWheelStates(source, 1, 1, 1, 1) end end end) function createBarrier2() local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(1427, x, y, z - 0.6) end addEvent("createBarrier2",true) addEventHandler("createBarrier2", root, createBarrier2) function destroyBlitz() restartResource(getThisResource()) end addEvent("destroyBlitz",true) addEventHandler("destroyBlitz", root, destroyBlitz) EDIT: Testado.
  6. Vou fazer essa caridade pra você, kk groupeName = "Blitz" function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end function openRender(source) local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("BOPE")) or isObjectInACLGroup("user."..accName, aclGetGroup("PMRJ")) then triggerClientEvent(source, "renderBlitz", root) end end addCommandHandler("blitz", openRender) function createCone() local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(1237, x, y, z - 1.2) end addEvent("createCone",true) addEventHandler("createCone", root, createCone) function createBarrier() local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(1228, x, y, z - 0.6, 0, 0, rz + 90) end addEvent("createBarrier",true) addEventHandler("createBarrier", root, createBarrier) colShape = {} function createStinger() local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(2899, x, y, z - 0.9, 0, 0, rz + 90) colShape[source] = createColRectangle(x - 2, y - 2, 4.0, 4.0 ) end addEvent("createStinger",true) addEventHandler("createStinger", root, createStinger) addEventHandler( "onClientColShapeHit", resourceRoot, function(theElement, matchingDimension) if getElementType(theElement) == "vehicle" then setVehicleWheelStates(theElement, 1, 1, 1, 1) end end) function createBarrier2() local rx, ry, rz = getElementRotation(source) local x, y, z = getElementPosition(source) createObject(1427, x, y, z - 0.6) end addEvent("createBarrier2",true) addEventHandler("createBarrier2", root, createBarrier2) function destroyBlitz() restartResource(getThisResource()) end addEvent("destroyBlitz",true) addEventHandler("destroyBlitz", root, destroyBlitz) EDIT: Não testei.
  7. Aonde cria o objeto Stinger, você cria junto uma colisão: createColRectangle Ai você abre uma nova função sendo chamada pelo o evento onClientColShapeHit (quando o cara passar pela a colisão) Dai nessa função você usa setVehicleWheelStates para furar os pneus.
  8. Cria um createColRectangle junto com o objeto e com o evento onClientColShapeHit você usa a função setVehicleWheelStates para furar os pneus. Parâmetros para furar o pneu: bool setVehicleWheelStates(vehicle theVehicle, 1, 1, 1, 1)
  9. addEventHandler("onElementDataChange", getRootElement(), function (ElementData) if ElementData == "Drift" then givePlayerMoney(source, getElementData(source, ElementData)) end end) EDIT: Não testei!
  10. Server-Side function vehicleHanding(veh) if veh then vehicle = veh else vehicle = source end if getElementModel(veh) == 560 then setVehicleHandling(veh, "mass", 1600) setVehicleHandling(veh, "turnMass", 3000) setVehicleHandling(veh, "dragCoeff", 1.8) setVehicleHandling(veh, "centerOfMass", { 0, 0.15, -0.3 } ) setVehicleHandling(veh, "percentSubmerged", 75) setVehicleHandling(veh, "tractionLoss", 0.9) setVehicleHandling(veh, "tractionMultiplier", 0.9) setVehicleHandling(veh, "tractionBias", 0.497) setVehicleHandling(veh, "numberOfGears", 5) setVehicleHandling(veh, "maxVelocity", 211) setVehicleHandling(veh, "engineAcceleration", 15) setVehicleHandling(veh, "engineInertia", 50) setVehicleHandling(veh, "driveType", "awd") setVehicleHandling(veh, "engineType", "petrol") setVehicleHandling(veh, "brakeDeceleration", 50) setVehicleHandling(veh, "ABS", false) setVehicleHandling(veh, "steeringLock", 35) setVehicleHandling(veh, "headLight", 0) setVehicleHandling(veh, "tailLight", 1) setVehicleHandling(veh, "animGroup", 0) setVehicleHandling(veh, "suspensionUpperLimit", 0.0) setVehicleHandling(veh, "suspensionLowerLimit", -0.04) end end addEventHandler("onVehicleEnter", root, vehicleHanding) addEventHandler("onResourceStart", resourceRoot, function() for index, veh in ipairs(getElementsByType("vehicle")) do vehicleHanding(veh) end end) EDIT: Não testei.
  11. Sem problemas amigo, até peço perdão por toda a confusão com alguns erros banais que cometi kkk
  12. Você está errando em algo, eu testei o código e estava funcionando.
  13. isObjectInACLGroup onVehicleStartEnter cancelEvent
  14. se for isso, retire toda a função "entrar_na_zona" e da uma testada.
  15. os ColShape estão criado no lugar certo? quando o player morrer o onColShapeLeave será acionado e irá voltar pro team antigo. (Se por algum motivo o Team antigo foi deletado, ele não conseguirá voltar.)