Jump to content

FuriouZ

Members
  • Posts

    459
  • Joined

  • Last visited

Everything posted by FuriouZ

  1. Thanks! More pictures: I'll going to make real palm trees etc... then it's gonna be a awesome!
  2. Hello! I'll show you my map what i'm creating It's not done yet because i started it yesterday but some pictures are here : Cool,huh ?
  3. Try this: CLIENT: --[[ Configuration ]]-- local INDICATOR_SIZE = 0.32 -- Size for the corona markers local INDICATOR_COLOR = { 255, 100, 10, 255 } -- Color in R G B A format local INDICATOR_FADE_MS = 160 -- Miliseconds to fade out the indicators local INDICATOR_SWITCH_TIMES = { 300, 400 } -- In miliseconds. First is time to switch them off, second to switch them on. local INDICATOR_AUTOSWITCH_OFF_THRESHOLD = 62 -- A value in degrees ranging (0, 90) preferibly far from the limits. --[[ Some globals to this context ]]-- local root = getRootElement() local localPlayer = getLocalPlayer() local vehiclesWithIndicator = {} -- Precalculate some stuff INDICATOR_AUTOSWITCH_OFF_THRESHOLD = INDICATOR_AUTOSWITCH_OFF_THRESHOLD / 90 --[[ * vectorLength Gets the length of a vector. --]] local function vectorLength ( vector ) return math.sqrt ( vector[1]*vector[1] + vector[2]*vector[2] + vector[3]*vector[3] ) end --[[ * normalizeVector Normalizes a vector, when possible, and returns the normalized vector plus the length. --]] local function normalizeVector ( vector ) local length = vectorLength ( vector ) if length > 0 then local normalizedVector = {} normalizedVector[1] = vector[1] / length normalizedVector[2] = vector[2] / length normalizedVector[3] = vector[3] / length return normalizedVector, length else return nil, length end end --[[ * crossProduct Calculates the cross product of two vectors. --]] local function crossProduct ( v, w ) local result = {} result[1] = v[2]*w[3] - v[3]*w[2] result[2] = w[1]*v[3] - w[3]*v[1] result[3] = v[1]*w[2] - v[2]*w[1] return result end --[[ * getFakeVelocity Gets a fake unitary velocity for a vehicle calculated using the current vehicle angle. --]] local function getFakeVelocity ( vehicle ) -- Get the angle around the Z axis local _, _, angle = getElementRotation ( vehicle ) local velocity = { 0, 0, 0 } velocity[1] = -math.sin ( angle ) velocity[2] = math.cos ( angle ) return velocity end --[[ * createIndicator Creates a marker for an indicator. --]] local function createIndicator () local x, y, z = getElementPosition(localPlayer) local indicator = createMarker ( x, y, z+4, 'corona', INDICATOR_SIZE, INDICATOR_COLOR[1], INDICATOR_COLOR[2], INDICATOR_COLOR[3], 0 ) setElementStreamable ( indicator, false ) return indicator end --[[ * createIndicatorState Creates a table with information about the indicators state. --]] local function createIndicatorState ( vehicle, indicatorLeft, indicatorRight ) local t = { vehicle = vehicle, -- The vehicle that this state refers to left = indicatorLeft, -- The state of the left indicator right = indicatorRight, -- The state of the right indicator coronaLeft = nil, -- The corona elements for the left indicator coronaRight = nil, -- The corona elements for the right indicator nextChange = 0, -- The time for the next change of the indicators timeElapsed = 0, -- Elapsed time since the last change currentState = false, -- If set to true, the coronas are activated. activationDir = nil, -- Direction that the vehicle was following when the indicator got activated, for auto shut down. } return t end --[[ * updateIndicatorState Updates the indicator state (i.e. creates/destroys the coronas). --]] local function updateIndicatorState ( state ) if not state then return end -- Store the number of indicators activated local numberOfIndicators = 0 -- Get the vehicle bounding box local xmin, ymin, zmin, xmax, ymax, zmax = getElementBoundingBox ( state.vehicle ) -- Transform the bounding box positions to fit properly the vehicle xmin = xmin + 0.2 xmax = xmax - 0.2 ymin = ymin + 0.2 ymax = ymax - 0.2 zmin = zmin + 0.6 -- Check the left indicator if state.left then if not state.coronaLeft then state.coronaLeft = { createIndicator (), createIndicator () } attachElements ( state.coronaLeft[1], state.vehicle, xmin, ymax, zmin ) attachElements ( state.coronaLeft[2], state.vehicle, xmin, -ymax, zmin ) end numberOfIndicators = numberOfIndicators + 1 elseif state.coronaLeft then destroyElement ( state.coronaLeft[1] ) destroyElement ( state.coronaLeft[2] ) state.coronaLeft = nil end -- Check the right indicator if state.right then if not state.coronaRight then state.coronaRight = { createIndicator (), createIndicator () } attachElements ( state.coronaRight[1], state.vehicle, -xmin, ymax, zmin ) attachElements ( state.coronaRight[2], state.vehicle, -xmin, -ymax, zmin ) end numberOfIndicators = numberOfIndicators + 1 elseif state.coronaRight then destroyElement ( state.coronaRight[1] ) destroyElement ( state.coronaRight[2] ) state.coronaRight = nil end -- Check if this is the car that you are driving and that there is one and only one indicator -- to enable auto switching off if numberOfIndicators == 1 and getVehicleOccupant ( state.vehicle, 0 ) == localPlayer then -- Store the current velocity, normalized, to check when will we have to switch it off. state.activationDir = normalizeVector ( { getElementVelocity ( state.vehicle ) } ) if not state.activationDir then -- The vehicle is stopped, get a fake velocity from the angle. state.activationDir = getFakeVelocity ( state.vehicle ) end else state.activationDir = nil end end --[[ * destroyIndicatorState Destroys an indicator state, deleting all its resources. --]] local function destroyIndicatorState ( state ) if not state then return end -- Destroy the left coronas if state.coronaLeft then destroyElement ( state.coronaLeft[1] ) destroyElement ( state.coronaLeft[2] ) state.coronaLeft = nil end -- Destroy the right coronas if state.coronaRight then destroyElement ( state.coronaRight[1] ) destroyElement ( state.coronaRight[2] ) state.coronaRight = nil end -- If I am the driver, reset the element data. if getVehicleOccupant ( state.vehicle ) == localPlayer then setElementData ( state.vehicle, 'i:left', false, true ) setElementData ( state.vehicle, 'i:right', false, true ) end end --[[ * performIndicatorChecks Checks how the indicators state should be: created, updated or destroyed. --]] local function performIndicatorChecks ( vehicle ) -- Get the current indicator states local indicatorLeft = getElementData(vehicle, 'i:left') local indicatorRight = getElementData(vehicle, 'i:right') -- Check if we at least have one indicator running local anyIndicator = indicatorLeft or indicatorRight -- Grab the current indicators state in the flashing period. local currentState = vehiclesWithIndicator [ vehicle ] -- If there's any indicator running, push it to the list of vehicles to draw the indicator. -- Else, remove it from the list. if anyIndicator then -- Check if there is already a state for this vehicle if currentState then -- Update the state currentState.left = indicatorLeft currentState.right = indicatorRight else -- Create a new state currentState = createIndicatorState ( vehicle, indicatorLeft, indicatorRight ) vehiclesWithIndicator [ vehicle ] = currentState end updateIndicatorState ( currentState ) elseif currentState then -- Destroy the current state destroyIndicatorState ( currentState ) vehiclesWithIndicator [ vehicle ] = nil end end --[[ * setIndicatorsAlpha Sets all the active indicators alpha. --]] local function setIndicatorsAlpha ( state, alpha ) if state.coronaLeft then setMarkerColor ( state.coronaLeft[1], INDICATOR_COLOR[1], INDICATOR_COLOR[2], INDICATOR_COLOR[3], alpha ) setMarkerColor ( state.coronaLeft[2], INDICATOR_COLOR[1], INDICATOR_COLOR[2], INDICATOR_COLOR[3], alpha ) end if state.coronaRight then setMarkerColor ( state.coronaRight[1], INDICATOR_COLOR[1], INDICATOR_COLOR[2], INDICATOR_COLOR[3], alpha )
  4. Here : https://community.multitheftauto.com/index.php?p= ... ls&id=3016
  5. FuriouZ

    Hide mods

    But then they can't see them in my server too ?
  6. FuriouZ

    Hide mods

    Hey all! I have an question that is there any way to hide mods that they doesn't download to resources folder, because i'm creating my own mods to my server and if i release it for public ,i need that they can't use my cars outside of my server. Sorry,if my englis is not good enough But i hope that you understand me what i want to ask...
  7. FuriouZ

    Radar

    Because i like it in right side more...
  8. FuriouZ

    Radar

    Hey! I have question,that is possible to move default radar from left to right ??
  9. FuriouZ

    DAYZ

    Here : http://www.upload.ee/files/3170184/DayZ.zip.html
  10. Hey! I updated my speedometer resource today, and i want to share it with community Digital Speedomeeter | 2.0 Created by Monster(ME) Features(2.0): -included "hud_messages" -You can turn engine on/off -You can turn lights on/off -You can lock your vehicle Features(1.1): -Works fine on all resolutions Features(1.0): -Custom font Special thanks to: GTX - Helped with resolutions Anderl - Helped with hud_messages Pictures: DOWNLOAD
  11. FuriouZ

    asdasd

    Good,but why you upload complicated resources ??
  12. FuriouZ

    Hud_Messages

    FINALLY ! THANK YOU SO MUCH FOR HELPING !
  13. FuriouZ

    Hud_Messages

    i'm so dumb,to understand it ... Just please repair it someone ,then if it is fixed i understand Thanks,,
  14. FuriouZ

    Hud_Messages

    Doesn't work Debug says .lua:25: ')' expected near 'unlocked'
  15. FuriouZ

    Hud_Messages

    But it doesn't ,hudm_messages running... i cheked debugscript ,no errors ,also script is server-side I really need it EDIT: Debugscript says something in line 25: ')' expected near 'unlocked' ?
  16. FuriouZ

    Hud_Messages

    ok no one don't help me .. I explain more. I have resource 'car locks' function toggleVehicleLocked(thePlayer) playervehicle=getPlayerOccupiedVehicle(thePlayer); if(playervehicle) then if(isVehicleLocked(playervehicle)) then setVehicleLocked(playervehicle,false); exports.hud_messages:showBox(Vehicle unlocked), player, 0, 255, 0, 200) else setVehicleLocked(playervehicle,true); exports.hud_messages:showBox(Vehicle locked), player, 255, 0, 0, 200) end end end What is wrong here ?
  17. FuriouZ

    Hud_Messages

    Hey! I downloaded script called 'hud_messages' from community ,but i don't understand how use it . I viewed this topic ...but still nothing ... So ,i need that for example ,if i die ,then it says in hud messages 'Venom died !' or somethin... Thanks for helping !
  18. FuriouZ

    Road effect

    Hey everyone ! Does anybody know where i can download this mod like water effect on road ? idk is it for mta or sanandreas but i have seen it in both
  19. Please remove from community https://community.multitheftauto.com/index.php?p= ... ls&id=6493 DONE
  20. FuriouZ

    REMOVE IT

    This: https://community.multitheftauto.com/index.php?p= ... ls&id=6493
  21. Does it hawe any release dates or something ? when it si complitley done ?
  22. FuriouZ

    REMOVE IT

    MTA admins/moderators,please remove this resource from community https://community.multitheftauto.com/index.php?p= ... ls&id=6493 I am original author of this map https://community.multitheftauto.com/index.php?p= ... ls&id=6462 He/she uploaded it without my premission.
  23. I had same problem.There is problem with setting dimension,but you can make interiors if you create an interior then restart interior system and enter there,then it will work.
  24. Very good ! but if you add save idk maybe to xml and possible to buy them then it is just a brilliant script !
×
×
  • Create New...