Leaderboard


Popular Content

Showing content with the highest reputation on 12/08/19 in all areas

  1. 1 point
    Try setCameraClip
  2. 1 point
    Vertex colors and material settings are both accessible in zmodeler. There is a video on the process here: @enzoDs
  3. 1 point
    addEventHandler("onClientRender",root,function() local _,_,playerRotation = getElementRotation(localPlayer) local cameraRotation = 360 - getPedCameraRotation(localPlayer) local cameraRad = math.rad(cameraRotation) local playerRad = math.rad(playerRotation) local includedAngle = math.cos(cameraRad-playerRad) local angleSymbol = math.sin(cameraRad-playerRad) if includedAngle < 0 then cameraRotation = playerRotation + 90*(angleSymbol > 0 and 1 or -1) setPedCameraRotation(localPlayer,cameraRotation) end end) Better to use cos/sin to solve this problem
  4. 1 point
    It can also be caused by bad normals, or not exporting them.
  5. 1 point
    What kind of object is it - vehicle? map object? Brightness depends on model settings such as vertex colors and materials. I know you're using ZM but it's very possible that the answer is found in the thread below. Please check #2 and #3 @enzoDs
  6. 1 point
    That looks pretty cool, well done
  7. 1 point
    Hello. I would like to report about a Fake Server that using Arab Legend's name ! Fake server : mtasa://37.59.72.197:22022 Real Server : mtasa://51.255.215.248:23114 Thank you .
  8. 1 point
    Thomas_Nightfire function getPointInFrontOfPoint(x, y, z, rZ, dist) local offsetRot = math.rad(rZ) local vx = x + dist * math.cos(offsetRot) local vy = y + dist * math.sin(offsetRot) return vx, vy, z end function GetMarrot(angle, rz) local marrot = 0 if(angle > rz) then marrot = -(angle-rz) else marrot = rz-angle end if(marrot > 180) then marrot = marrot-360 elseif(marrot < -180) then marrot = marrot+360 end return marrot end function findRotation(x1, y1, x2, y2) local t = -math.deg(math.atan2(x2 - x1, y2 - y1)) return t < 0 and t + 360 or t end local px,py,pz = getElementPosition(localPlayer) local prx,pry,prz = getElementRotation(localPlayer) local vx,vy,vz = getPointInFrontOfPoint(px,py,pz, prz+90, 15) local thePed = createPed(299, vx,vy,vz+1, prz+180) local theVehicle = createVehicle(404, vx,vy,vz+1, 0,0,prz+180) warpPedIntoVehicle(thePed, theVehicle) function UpdateBot() px,py,pz = getElementPosition(localPlayer) prx,pry,prz = getElementRotation(localPlayer) vx,vy,vz = getElementPosition(theVehicle) local vrx,vry,vrz = getElementRotation(theVehicle) local brakes = false local maxspd = 40 local MaxDist = 4 local vehreverse = false if(getDistanceBetweenPoints2D(px,py, vx, vy) < MaxDist) then brakes = true end if(brakes) then setPedAnalogControlState(thePed, "accelerate", 0) setPedAnalogControlState(thePed, "brake_reverse", 0) setPedControlState(thePed, "handbrake", true) setElementVelocity (theVehicle, 0,0,0) else local vxv, vyv, vzv = getElementVelocity(theVehicle) local s = (vxv^2 + vyv^2 + vzv^2)^(0.5)*156 -- Speed local rot = GetMarrot(findRotation(vx,vy,px,py),vrz) if(rot > 80) then if(rot > 100) then vehreverse = true end rot = 20 elseif(rot < -20) then if(rot < -80) then vehreverse = true end rot = -20 end if(vehreverse) then setPedAnalogControlState(thePed, "brake_reverse", 1-(s*1/maxspd)) setPedAnalogControlState(thePed, "accelerate", 0) setPedControlState(thePed, "handbrake", false) if(s > 10) then setPedControlState(thePed, "handbrake", true) else if(rot > 0) then setPedAnalogControlState(thePed, "vehicle_left", (rot)/20) else setPedAnalogControlState(thePed, "vehicle_right", -(rot)/20) end end else if(rot > 0) then setPedAnalogControlState(thePed, "vehicle_right", (rot)/20) else setPedAnalogControlState(thePed, "vehicle_left", -(rot)/20) end setPedAnalogControlState(thePed, "brake_reverse", 0) setPedControlState(thePed, "handbrake", false) if(s < maxspd) then setPedAnalogControlState(thePed, "accelerate", 1-(s*1/maxspd)) else setPedAnalogControlState(thePed, "accelerate", 0) setPedAnalogControlState(thePed, "brake_reverse", (s/maxspd)-1) end end end end setTimer(UpdateBot, 50, 0) Demo