Jump to content

Search the Community

Showing results for tags 'rhino'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 5 results

  1. oad-- *** THESE ARE THE SETTINGS. MODIFY IN META.XML *** reloadTime = 6000 -- for Rhino reloadTimeHydra = 4000 -- for Hydra reloadTimeHunter = 3000 -- for Hunter range = 2 -- To increase range, set this value to 1. To decrease range, use 3. My code is optimized for 2. --*** BETTER NOT TOUCH BELOW *** event = nil fired = false drawHandler = nil armedVehicles = {[425]=true, [520]=true, [432]=true} w, h = guiGetScreenSize() height = nil endY = nil r, g = 255, 0 time = 0 function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z end function onStart() height = math.ceil(h / 50) if height < 19 then height = 19 end endY = math.ceil((h/100)*6) corona = createMarker (0, 0, -10, "corona", 1.0, 200, 100, 0, 150) bindKey ( "mouse1", "down", toggleRhino ) bindKey("vehicle_fire", "down", toggleHunter) bindKey("vehicle_secondary_fire", "down", toggleHunter) color = tocolor(255, 255, 255, 200) end addEventHandler("onClientResourceStart", resourceRoot, onStart) function entering( thePlayer, seat ) if thePlayer == localPlayer then toggleControl ( "vehicle_fire", true ) toggleControl ( "vehicle_secondary_fire", true ) local model = getElementModel ( source ) if model == 432 or model == 425 or model == 520 then drawHandler = addEventHandler("onClientRender", root, reloadFinished) end if model == 432 then toggleControl ( "vehicle_fire", false ) toggleControl ( "vehicle_secondary_fire", false ) addEventHandler("onClientRender", root, marker) event = true end end end addEventHandler("onClientVehicleEnter", getRootElement(), entering) function exit( thePlayer, seat ) if thePlayer == localPlayer then local model = getElementModel ( source ) if model == 432 then if event ~= nil then removeEventHandler("onClientRender", root, marker) event = nil end toggleControl ( "vehicle_fire", true ) toggleControl ( "vehicle_secondary_fire", true ) end end end addEventHandler("onClientVehicleExit", getRootElement(), exit) addEventHandler("onClientElementDestroy", getRootElement(), function () if (getElementModel(source) == 432 and getVehicleController(source) == localPlayer) then if event ~= nil then removeEventHandler("onClientRender", root, marker) event = nil end toggleControl ( "vehicle_secondary_fire", true ) end end) function wasted() if source == localPlayer then if event ~= nil then removeEventHandler("onClientRender", root, marker) event = nil end toggleControl ( "vehicle_fire", true ) toggleControl ( "vehicle_secondary_fire", true ) end end addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), wasted ) function clientResourceStop() toggleControl ( "vehicle_fire", true ) toggleControl ( "vehicle_secondary_fire", true ) end addEventHandler( "onClientResourceStop", getResourceRootElement(getThisResource()), clientResourceStop ) function toggleRhino() if fired == false then if isPedInVehicle ( localPlayer ) and not isCursorShowing() then local veh = getPedOccupiedVehicle ( localPlayer ) if (veh) then if ( getElementModel ( veh ) == 432 ) then fired = true local turX, turY, turZ = getElementPosition(veh) local cx,cy,cz = getVehicleComponentPosition( veh, "misc_a" ) local x, y, z = getVehicleComponentPosition( veh, "misc_c" ) local barrelX, barrelY, barrelZ = getPositionFromElementOffset(veh,cx,cy,cz) local muzzleX, muzzleY, muzzleZ = getPositionFromElementOffset(veh,x,y,z) local velX = (muzzleX - barrelX) /range local velY = (muzzleY - barrelY) /range local velZ = (muzzleZ - barrelZ) /range local vx, vy, vz = getElementVelocity(veh) setElementVelocity (veh, vx+(((velX/3)*(-1))/50), vy+(((velY/3)*(-1))/50), vz+(((velZ/3)*(-1))/50) ) bullet = createProjectile(veh, 21, muzzleX, muzzleY, muzzleZ, 1, nil, 0, 0, 0, velX, velY, velZ) createExplosion(turX, turY, turZ-10, 8, false, 0.5, false) removeEventHandler("onClientRender", root, reloadFinished) drawHandler = nil start = getTickCount() drawHandler = addEventHandler("onClientRender", root, reload) time = 6000 soundTimer = setTimer(function() local sound = playSound("reload.mp3") setSoundVolume(sound, 0.1) end, (reloadTime-1000), 1) end end end end end function toggleHunter(control) if isPedInVehicle(localPlayer) then local model = getElementModel(getPedOccupiedVehicle(localPlayer)) if model == 425 and fired == false and control == "vehicle_fire" then fired = true setTimer(function() toggleControl ( "vehicle_fire", false ) end, 100, 1) setTimer(function() toggleControl ( "vehicle_fire", true ) fired = false end, reloadTimeHunter, 1) removeEventHandler("onClientRender", root, reloadFinished) drawHandler = nil start = getTickCount() drawHandler = addEventHandler("onClientRender", root, reload) time = 3000 elseif model == 520 and fired == false and control == "vehicle_secondary_fire" then fired = true setTimer(function() toggleControl ( "vehicle_secondary_fire", false ) end, 100, 1) setTimer(function() toggleControl ( "vehicle_secondary_fire", true ) fired = false end, reloadTimeHydra, 1) removeEventHandler("onClientRender", root, reloadFinished) drawHandler = nil start = getTickCount() drawHandler = addEventHandler("onClientRender", root, reload) time = 4000 end end end function reload() if not isPedInVehicle(localPlayer) then removeEventHandler("onClientRender", root, reload) drawHandler = nil end setMarkerColor ( corona, 255, 0, 0, 100 ) local getTime = (getTickCount()) - start local height = math.ceil(h / 50) if height < 19 then height = 19 end dxDrawRectangle (0, h-endY-height-6, height+6, endY, tocolor(0,0,0,150), false) local endY = math.ceil((h/100)*6) endY = endY - 4 if getTime <= time then endY = (getTime/time)*endY else removeEventHandler("onClientRender", root, reload) drawHandler = nil drawHandler = addEventHandler("onClientRender", root, reloadFinished) if getElementModel(getPedOccupiedVehicle(localPlayer)) ~= 432 then local sfx = playSFX ( "genrl", 136, 72 ) setSoundVolume (sfx, 1) end setMarkerColor ( corona, r, g, 0, 150 ) start = nil fired = false end dxDrawRectangle (2, h-endY-height-8, height+2, endY, tocolor(220,0,0,150), false) end function reloadFinished() if not isPedInVehicle(localPlayer) then removeEventHandler("onClientRender", root, reloadFinished) drawHandler = nil else dxDrawRectangle (0, h-endY-height-6, height+6, endY, tocolor(0,0,0,150), false) dxDrawRectangle (2, h-endY-height-4, height+2, endY-4, tocolor(220,0,0,150), false) end end function marker() if not isPedInVehicle(localPlayer) then removeEventHandler("onClientRender", getRootElement(), marker) if isTimer(soundTimer) then killTimer(soundTimer) end fired = false drawHandler = nil setElementPosition (corona, 0, 0, -10) else local vx, vy, vz = nil, nil, nil local cx, cy, cz = nil, nil, nil local veh = getPedOccupiedVehicle ( localPlayer ) if veh then local x, y, z = getVehicleComponentPosition( veh, "misc_a" ) cx, cy, cz = getPositionFromElementOffset( veh, x, y, z ) x, y, z = getVehicleComponentPosition( veh, "misc_c" ) vx, vy, vz = getPositionFromElementOffset( veh, x, y, z ) if vx ~= nil then local velX = (vx - cx) /range local velY = (vy - cy) /range local velZ = (vz - cz) /range local vx1, vy1 = cx + (velX * 50 * 0.1), cy + (velY * 50 * 0.1) local vx2, vy2 = cx + (velX * 50 * 0.2), cy + (velY * 50 * 0.2) local vx3, vy3 = cx + (velX * 50 * 0.3), cy + (velY * 50 * 0.3) local vx4, vy4 = cx + (velX * 50 * 0.5), cy + (velY * 50 * 0.5) local vx5, vy5 = cx + (velX * 50 * 0.6), cy + (velY * 50 * 0.6) local vx6, vy6 = cx + (velX * 50 * 0.7), cy + (velY * 50 * 0.7) local vx7, vy7 = cx + (velX * 50 * 0.8), cy + (velY * 50 * 0.8) local m1 = cz + (velZ * 50 * 0.1) - ((getGravity()*2400*0.01)/2) local m2 = cz + (velZ * 50 * 0.2) - ((getGravity()*2400*0.04)/2) local m3 = cz + (velZ * 50 * 0.3) - ((getGravity()*2400*0.09)/2) local m4 = cz + (velZ * 50 * 0.5) - ((getGravity()*2400*0.25)/2) local m5 = cz + (velZ * 50 * 0.6) - ((getGravity()*2400*0.36)/2) local m6 = cz + (velZ * 50 * 0.7) - ((getGravity()*2400*0.49)/2) local m7 = cz + (velZ * 50 * 0.8) - ((getGravity()*2400*0.64)/2) local hit, mx, my, mz, elementHit = processLineOfSight (cx, cy, cz, vx1, vy1, m1, true, true, true, true, true, false, false, false, veh) if hit == false then hit, mx, my, mz, elementHit = processLineOfSight (vx1, vy1, m1, vx2, vy2, m2, true, true, true, true, true, false, false, false, veh) if hit == false then hit, mx, my, mz, elementHit = processLineOfSight (vx2, vy2, m2, vx3, vy3, m3, true, true, true, true, true, false, false, false, veh) if hit == false then hit, mx, my, mz, elementHit = processLineOfSight (vx3, vy3, m3, vx4, vy4, m4, true, true, true, true, true, false, false, false, veh) if hit == false then hit, mx, my, mz, elementHit = processLineOfSight (vx4, vy4, m4, vx5, vy5, m5, true, true, true, true, true, false, false, false, veh) if hit == false then hit, mx, my, mz, elementHit = processLineOfSight (vx5, vy5, m5, vx6, vy6, m6, true, true, true, true, true, false, false, false, veh) if hit == false then hit, mx, my, mz, elementHit = processLineOfSight (vx6, vy6, m6, vx7, vy7, m7, true, true, true, true, true, false, false, false, veh) if hit == false then mx, my, mz = vx7, vy7, m7 end end end end end end end local dist = getDistanceBetweenPoints3D ( vx, vy, vz, mx, my, mz ) if dist < 50 then r = 5.1 * dist g = 255 elseif dist >= 50 then r = 255 g = 255 - ((dist-50) * 5.1) end setElementPosition (corona, mx, my, mz) setMarkerColor ( corona, r, g, 0, 150 ) if not drawHandler then drawHandler = addEventHandler("onClientRender", root, reloadFinished) end end end end end function projectileSound ( creator ) local zeType = getProjectileType( source ) if zeType == 21 then if getElementType(creator) == "vehicle" then if getElementModel(creator) == 432 then local velX, velY, velZ = getElementVelocity(source) local cx, cy, cz = getVehicleComponentPosition( creator, "misc_c" ) cx, cy, cz = getPositionFromElementOffset(creator, cx, cy, cz) fxAddTankFire(cx, cy, cz, velX, velY, velZ) local sound1 = playSFX3D ( "genrl", 45, 2, cx, cy, cz ) local sound2 = playSFX3D ( "genrl", 45, 3, cx, cy, cz ) local sound3 = playSFX3D ( "genrl", 45, 4, cx, cy, cz ) setSoundMaxDistance( sound1, 300 ) setSoundMaxDistance( sound2, 300 ) setSoundMaxDistance( sound3, 200 ) setSoundVolume(sound1, 2) setSoundVolume(sound2, 2) setSoundVolume(sound3, 2) --setElementModel(source, 342) end end end end addEventHandler( "onClientProjectileCreation", getRootElement(), projectileSound ) I'm aiming to make a crosshair that will work fine with this, but I haven't been successful. Can you help me.
  2. Client local armoredVehicles = { [432] = true, [601] = true } function warMachineDamage(attacker, weapon, loss, x, y, z, tire) local model = getElementModel(source) if weapon and armoredVehicles[model] then cancelEvent() triggerServerEvent ("damageWarMachine", source, source, attacker, weapon, bodypart ) end end addEventHandler("onClientVehicleDamage", root, warMachineDamage) Server addEvent( "damageWarMachine", true ) function damageWarMachine( vehicle, attacker, weapon, bodypart) local vehicleHealth = getElementHealth(vehicle) setElementHealth(vehicle, vehicleHealth - 250 ) end addEventHandler( "damageWarMachine", root, damageWarMachine ) Não quero que ele leve Hit Kill, e sim tome danos de leve, exemplo: 1 tiro de RPG tira 40% de vida. Más não consigo ?
  3. Hello all MTA community recently I checked in my server that I need to do some settings like rhino I wanna make rhino for timer purpose like all can buy rhino but for minimum time -10 min 0r 5min till he die !how can I ? From fr-cilent .Lua or should I need add any other way ? Next is : I want to give more effect of ammos for ak47,m4 more ammo ,for snatchels and grenades I mean when I throw 1 grenade the other player must die even if he is with armour+health ,in recently MTA by thrwoing 4 grenades or snatchels only able to make player die ! anyone suggest me how to ? Please let me know Another one is for freeroam servers many use binds to regain more kills ,when they snatchel they recently use it has blast too I want to add this to as timer (wait 10 sec to use another key ) Let me know pls
  4. Hello there, Recently I've been trying to change the handling of the rhino and beagle using setVehicleHandling. The problem is very simple, it doesn't work. When I change the vehicle ID to a regular car (infernus, banshee or what have you) it works perfectly Is it not possible to change the handling of aircraft and the rhino? or is there some other way to change it? For now I just want to alter the accelation and top speed of the vehicle (I took the script from the mta wikia) function vhandling ( ) for _,v in pairs(getElementsByType("vehicle")) do if getElementModel(v) == 432 then -- Rhino ID, any regular car ID works, rhino doesn't setVehicleHandling(v, "maxVelocity", 30000.0) setVehicleHandling(v, "engineAcceleration", 30000.0) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vhandling ) Thanks in advance!
  5. I have a bug on my server. The Rhinos have an extra wheel, In Grand Theft Auto San Andreas , When you write HESOYAM this wheel appears and in appearsMTA it always, I was researching and I did not find anything about this since I had two options, Download a model that has no wheels but use the Rhino Tracks cleo or disappear the extra wheel, For obvious reasons I preferred to disappear the extra wheel but still I have not found how to do it help me pls. (#)
×
×
  • Create New...