Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eairstrikeprojectileHandler = {
- shellNum = 1,
- shells = {},
- defaultShell = {active=false}
- }
- function init()
- RegisterTool("eairstrike", "Enhanced Air Strike", "MOD/vox/eairstrike.vox")
- SetBool("game.tool.eairstrike.enabled", true)
- SetFloat("game.tool.eairstrike.ammo", 101)
- eaop = GetBool("savegame.mod.eaop")
- for i=1, 9999 do
- eairstrikeprojectileHandler.shells[i] = deepcopy(eairstrikeprojectileHandler.defaultShell)
- end
- if GetString("savegame.mod.controls.changetype") == "" then
- SetString("savegame.mod.controls.changetype","V")
- end
- salvoSliderKey = GetString("savegame.mod.controls.salvoslider")
- if GetString("savegame.mod.controls.changeammo") == "" then
- SetString("savegame.mod.controls.changeammo","C")
- end
- changeammoKey = GetString("savegame.mod.controls.changeammo")
- changetypeKey = GetString("savegame.mod.controls.changetype")
- changespreadKey = GetString("savegame.mod.controls.changespread")
- bullet_spread = 0
- flycamenabled = false
- eairstrikeenabled = false
- firing = false
- radioactivated = false
- damage = 1
- gravity = Vec(0, 0, 0)
- velocity = 1.0
- shotDelay = 0.01
- zoomlevel = 6
- maxzoom = 12
- minzoom = 0.5
- lightTimer = 0
- equipTimer = 0
- selectedshell = 1
- ammoselecter = {}
- ammoselectermax = {}
- ammoselectermax[1] = 2
- ammoselectermax[2] = 1
- ammoselectermax[3] = 1
- ammoselectermax[4] = 1
- ammoselectermax[5] = 1
- ammoselectermax[6] = 1
- shoottimers = {}
- for i=1, 6 do
- shoottimers[i] = 0
- ammoselecter[i] = 1
- end
- shellsprites = {}
- shellsprites[1] = LoadSprite("MOD/img/25mm.png")
- shellsprites[2] = LoadSprite("MOD/img/40mm.png")
- shellsprites[3] = LoadSprite("MOD/img/105mm.png")
- shellsprites[4] = LoadSprite("MOD/img/105mm.png")
- shellsprites[5] = LoadSprite("MOD/img/pixel.png")
- shellsprites[6] = LoadSprite("MOD/img/flame.png")
- gunsounds = {}
- gunsounds[1] = LoadLoop("MOD/snd/gun1.ogg")
- gunsounds[2] = LoadSound("MOD/snd/gun2.ogg")
- gunsounds[3] = LoadSound("MOD/snd/gun3.ogg")
- gunsounds[4] = LoadSound("MOD/snd/gun4.ogg")
- gunsounds[5] = LoadSound("MOD/snd/gun5.ogg")
- gunsounds[6] = LoadLoop("MOD/snd/gun6.ogg")
- planesound = LoadLoop("MOD/snd/planeloop.ogg")
- explosionsounds = {}
- explosionsounds[1] = LoadSound("explosion/s0.ogg")
- explosionsounds[6] = LoadSound("explosion/s0.ogg")
- switchsound = LoadSound("MOD/snd/switch.ogg")
- beepsound = LoadSound("MOD/snd/radiobeep.ogg")
- plane = {}
- plane.pos = Vec(0, 0 ,0)
- plane.rot = QuatRotateQuat(Quat(), QuatEuler(-90, -90, 0))
- plane.barrel = {}
- plane.barrel.rot = Quat()
- plane.pos[2] = 100
- plane.pos[1] = plane.pos[1] + 100
- end
- function clamp(value, mi, ma)
- if value < mi then value = mi end
- if value > ma then value = ma end
- return value
- end
- function deepcopy(orig)
- local orig_type = type(orig)
- local copy
- if orig_type == 'table' then
- copy = {}
- for orig_key, orig_value in next, orig, nil do
- copy[deepcopy(orig_key)] = deepcopy(orig_value)
- end
- setmetatable(copy, deepcopy(getmetatable(orig)))
- else
- copy = orig
- end
- return copy
- end
- function GetAimPos()
- if bullet_spread ~= 0 then
- angle = math.random() * 2 * math.pi
- radius = math.random() * bullet_spread
- spread_x = math.cos(angle) * radius
- spread_y = math.sin(angle) * radius
- else
- spread_x = 0
- spread_y = 0
- end
- local ct = GetCameraTransform()
- local forwardPos = TransformToParentPoint(ct, Vec(spread_x, spread_y, -150))
- local direction = VecSub(forwardPos, ct.pos)
- local distance = VecLength(direction)
- local direction = VecNormalize(direction)
- local hit, hitDistance = QueryRaycast(ct.pos, direction, distance)
- if hit then
- forwardPos = TransformToParentPoint(ct, Vec(spread_x, spread_y, -hitDistance))
- distance = hitDistance
- end
- return forwardPos, hit, distance
- end
- function GetCamLookPos()
- if bullet_spread ~= 0 then
- angle = math.random() * 2 * math.pi
- radius = math.random() * bullet_spread
- spread_x = math.cos(angle) * radius
- spread_y = math.sin(angle) * radius
- else
- spread_x = 0
- spread_y = 0
- end
- local forwardPos = TransformToParentPoint(plane.barrel, Vec(spread_x, spread_y, -150))
- local direction = VecSub(forwardPos, plane.barrel.pos)
- local distance = VecLength(direction)
- local direction = VecNormalize(direction)
- local hit, hitDistance = QueryRaycast(plane.barrel.pos, direction, distance)
- if hit then
- forwardPos = TransformToParentPoint(plane.barrel, Vec(spread_x, spread_y, -hitDistance))
- distance = hitDistance
- end
- return forwardPos, hit, distance
- end
- function GetShootDistance()
- local direction = VecSub(aimpos, plane.barrel.pos)
- local distance = VecLength(direction)
- local direction = VecNormalize(direction)
- local hit, hitDistance = QueryRaycast(plane.barrel.pos, direction, distance)
- if hit then
- forwardPos = TransformToParentPoint(plane.barrel, Vec(0, 0, -hitDistance))
- distance = hitDistance
- end
- return distance
- end
- function FlyCam()
- local mousewheel = InputValue("mousewheel")
- if mousewheel ~= 0 and GetBool("game.input.locktool") == false then
- zoomlevel = clamp(zoomlevel - mousewheel/2, minzoom, maxzoom)
- end
- local mx, my, a, d = InputValue("mousedx"), InputValue("mousedy"), InputDown("A"), InputDown("D")
- local turn = 0
- if a then turn = 1 elseif d then turn = -1 end
- local rotdiv = 200/zoomlevel
- if planevox ~= 0 then rotdiv = rotdiv * 2 end
- plane.barrel.rot = QuatRotateQuat(plane.barrel.rot, QuatEuler(-my/rotdiv, -mx/rotdiv, 0))
- plane.barrel.rot = QuatRotateQuat(plane.barrel.rot, QuatEuler(0, 0, turn))
- local newT = Transform(plane.barrel.pos, plane.barrel.rot)
- SetCameraTransform(newT, zoomlevel*10)
- SetPlayerTransform(GetPlayerTransform())
- PlayLoop(planesound)
- end
- function Shoot()
- if shoottimers[selectedshell] > 0 then
- return
- end
- local distance = GetShootDistance()
- local barrelEnd = TransformToParentPoint(plane.barrel, Vec(0, -1, -2))
- local dir = VecSub(aimpos, barrelEnd)
- eairstrikeprojectileHandler.shells[eairstrikeprojectileHandler.shellNum] = deepcopy(eairstrikeprojectileHandler.defaultShell)
- loadedShell = eairstrikeprojectileHandler.shells[eairstrikeprojectileHandler.shellNum]
- loadedShell.active = true
- loadedShell.type = type
- loadedShell.pos = barrelEnd
- loadedShell.cannonLoc = plane.barrel
- loadedShell.type = selectedshell
- loadedShell.ammo = ammoselecter[selectedshell]
- loadedShell.predictedBulletVelocity = VecScale(dir, velocity)
- eairstrikeprojectileHandler.shellNum = (eairstrikeprojectileHandler.shellNum%#eairstrikeprojectileHandler.shells) +1
- if not eaop then
- --if selectedshell == 1 or selectedshell == 6 then
- if selectedshell == 1 then
- shoottimers[selectedshell] = shotDelay
- elseif selectedshell == 2 or selectedshell == 3 or selectedshell == 4 then
- shoottimers[selectedshell] = shotDelay * (selectedshell * 3.0)
- elseif selectedshell == 5 then
- shoottimers[selectedshell] = 0.25
- elseif selectedshell == 6 then
- shoottimers[selectedshell] = 0.02
- else
- end
- end
- if selectedshell ~= 1 and selectedshell ~= 6 then
- local p = GetPlayerPos()
- if selectedshell == 3 then
- PlaySound(gunsounds[selectedshell], plane.barrel.pos, 0.7)
- PlaySound(gunsounds[selectedshell], p, 0.35)
- else
- PlaySound(gunsounds[selectedshell], plane.barrel.pos, 1)
- PlaySound(gunsounds[selectedshell], p, 0.5)
- end
- else
- end
- lightTimer = 0.05
- end
- function ProjectileOperations(projectile, dt)
- local hit, dist, normal, shape = QueryRaycast(position, direction, 500)
- projectile.predictedBulletVelocity = VecAdd(projectile.predictedBulletVelocity,(VecScale(gravity, dt)))
- local point2 = VecAdd(projectile.pos,VecScale(projectile.predictedBulletVelocity,dt))
- local hit, dist1 = QueryRaycast(projectile.pos, VecNormalize(VecSub(point2,projectile.pos)),VecLength(VecSub(point2,projectile.pos)))
- if hit then
- hitPos = VecAdd(projectile.pos, VecScale(VecNormalize(VecSub(point2,projectile.pos)),dist1))
- projectile.active = false
- if projectile.type == 1 then
- if projectile.ammo == 1 then
- Explosion(hitPos, 0.5)
- MakeHole(hitPos, 1.25, 1.25, 1.25)
- SpawnFire(hitPos)
- SpawnParticle("smoke", hitPos, Vec(0, 1.0+math.random(1,10)*0.1, 0), 1.5, 1.5)
- PlaySound(explosionsounds[selectedshell], hitPos, 0.5)
- elseif projectile.ammo == 2 then
- MakeHole(hitPos, 0.55, 0.55, 0.55)
- MakeHole(hitPos, 0.5, 0.5, 0.5)
- MakeHole(hitPos, 0.45, 0.45, 0.45)
- SpawnParticle("smoke", hitPos, Vec(0, 1.0+math.random(1,10)*0.1, 0), 1.5, 1.5)
- PlaySound(explosionsounds[selectedshell], hitPos, 0.5)
- end
- elseif projectile.type == 2 then
- Explosion(hitPos, 1.5)
- MakeHole(hitPos, 3.75, 3.75, 3.75)
- SpawnFire(hitPos)
- elseif projectile.type == 3 then
- Explosion(hitPos, 4)
- MakeHole(hitPos, 5, 5, 5)
- SpawnFire(hitPos)
- elseif projectile.type == 4 then
- local intervalo4 = 360 / 9
- for degrees = 1, 360, intervalo4 do
- local x = hitPos[1] + 5 * math.sin(degrees)
- local z = hitPos[3] + 5 * math.cos(degrees)
- local hitPosition4 = Vec(x, hitPos[2],z)
- Explosion(hitPosition4, 3.5)
- end
- Explosion(VecAdd(hitPos, Vec(0, 5, 0)), 4)
- Explosion(VecAdd(hitPos, Vec(0, -5, 0)), 4)
- Explosion(hitPos, 3.5)
- elseif projectile.type == 5 then
- local intervalo = 360 / 9
- local intervalo2 = 360 / 24
- local intervalo3 = 360 / 48
- ParticleReset()
- ParticleType("fire")
- ParticleColor(0.3, 0.2, 0.1)
- ParticleCollide(0)
- ParticleRadius(10, 5)
- for degrees = 1, 360, intervalo do
- local x = hitPos[1] + 9.8 * math.sin(degrees)
- local z = hitPos[3] + 9.8 * math.cos(degrees)
- local hitPosition = Vec(x, hitPos[2],z)
- SpawnParticle(hitPosition,Vec(0,20,0), 1, 10)
- Explosion(hitPosition, 4)
- Explosion(VecAdd(hitPosition, Vec(0, 8, 0)), 4)
- Explosion(VecAdd(hitPosition, Vec(0, -8, 0)), 4)
- SpawnFire(hitposition)
- --DebugPrint(degrees)
- end
- for degrees = 1, 360, intervalo2 do
- local x2 = hitPos[1] + 18 * math.sin(degrees)
- local z2 = hitPos[3] + 18 * math.cos(degrees)
- local hitPosition2 = Vec(x2, hitPos[2],z2)
- MakeHole(hitPosition2, 5, 5, 5)
- MakeHole(VecAdd(hitPosition2, Vec(0, 6, 0)), 5, 5, 5)
- MakeHole(VecAdd(hitPosition2, Vec(0, -6, 0)), 5, 5, 5)
- SpawnFire(hitposition2)
- end
- for degrees = 1, 360, intervalo3 do
- local x3 = hitPos[1] + 25 * math.sin(degrees)
- local z3 = hitPos[3] + 25 * math.cos(degrees)
- local hitPosition3 = Vec(x3, hitPos[2],z3)
- MakeHole(hitPosition3, 5, 5, 5)
- MakeHole(VecAdd(hitPosition3, Vec(0, 6, 0)), 5, 5, 5)
- MakeHole(VecAdd(hitPosition3, Vec(0, -6, 0)), 5, 5, 5)
- SpawnFire(hitposition3)
- end
- Explosion(VecAdd(hitPos, Vec(0, 6, 0)), 4)
- Explosion(VecAdd(hitPos, Vec(0, -6, 0)), 4)
- Explosion(hitPos, 4)
- --ParticleColor(1,0.5,0,1,0.3,0)
- --ParticleEmissive(3, 0)
- --ParticleTile(5)
- ParticleColor(1, 0.2, 0)
- SpawnParticle(hitPos,Vec(0,20,0), 1, 10)
- SpawnFire(hitPos)
- else
- ParticleReset()
- ParticleType("smoke")
- ParticleTile(5)
- ParticleColor(1, 0.2, 0)
- ParticleRadius(0.2)
- ParticleEmissive(5, 4)
- local intervalo5 = 360 / 6
- for degrees = 1, 360, intervalo5 do
- local x = hitPos[1] + 0.3 * math.sin(degrees)
- local z = hitPos[3] + 0.3 * math.cos(degrees)
- local hitPosition5 = Vec(x, hitPos[2],z)
- SpawnParticle(hitPosition5, Vec(0, 0, 0), 1.8)
- SpawnParticle("smoke", hitPosition5, Vec(0,2,0), .75, 4)
- SpawnFire(VecAdd(hitPosition5, Vec(0, 0.3, 0)))
- SpawnFire(VecAdd(hitPosition5, Vec(0, -0.3, 0)))
- --SpawnFire(VecAdd(hitPosition5, Vec(0, 1, 0)))
- --SpawnFire(VecAdd(hitPosition5, Vec(0, -1, 0)))
- --SpawnFire(VecAdd(hitPosition5, Vec(0, 1, 0)))
- --SpawnFire(VecAdd(hitPosition5, Vec(0, -1, 0)))
- SpawnFire(hitPosition5)
- end
- local intervalo6 = 360 / 24
- for degrees = 1, 360, intervalo6 do
- local x = hitPos[1] + 1 * math.sin(degrees)
- local z = hitPos[3] + 1 * math.cos(degrees)
- local hitPosition6 = Vec(x, hitPos[2],z)
- SpawnParticle(hitPosition6, Vec(0, 0, 0), 1.8)
- --SpawnParticle("smoke", hitPosition6, Vec(0,2,0), .75, 4)
- --SpawnFire(VecAdd(hitPosition6, Vec(0, 0.5, 0)))
- --SpawnFire(VecAdd(hitPosition6, Vec(0, -0.5, 0)))
- --SpawnFire(VecAdd(hitPosition6, Vec(0, 1, 0)))
- --SpawnFire(VecAdd(hitPosition6, Vec(0, -1, 0)))
- --SpawnFire(hitPosition6)
- end
- SpawnParticle(hitPos, Vec(0, 0, 0), 1.8, 50)
- SpawnParticle("smoke", hitPos, Vec(0,2,0), .75, 4)
- SpawnFire(VecAdd(hitPos, Vec(0, 0.3, 0)))
- SpawnFire(VecAdd(hitPos, Vec(0, -0.3, 0)))
- --SpawnFire(VecAdd(hitPos, Vec(0, 1, 0)))
- --SpawnFire(VecAdd(hitPos, Vec(0, -1, 0)))
- --SpawnFire(VecAdd(hitPos, Vec(0, 1, 0)))
- --SpawnFire(VecAdd(hitPos, Vec(0, -1, 0)))
- SpawnFire(hitPos)
- MakeHole(hitPos, 0.5, 0.5, 0.5)
- PlaySound(explosionsounds[selectedshell], hitPos, 0.4)
- end
- end
- local width = 0.35
- local length = 1
- local rot = QuatLookAt(projectile.pos, point2)
- local spritepos = TransformToParentPoint(Transform(projectile.pos, rot), Vec(0, 0, -1))
- rot = QuatRotateQuat(rot, QuatEuler(-90, 0, 0))
- local transform = Transform(spritepos, rot)
- if projectile.type == 5 then
- ballVisual = {
- {0,0,0,90,0,0,0.5,0.5,0.1,0.1,0.1},
- {0.25,0.75,0,0,90,0,0.5,1.5,0.1,0.1,0.1},
- {-0.25,0.75,0,0,90,0,0.5,1.5,0.1,0.1,0.1},
- {0,0.75,0.25,0,0,0,0.5,1.5,0.1,0.1,0.1},
- {0,0.75,-0.25,0,0,0,0.5,1.5,0.1,0.1,0.1},
- {0,1.5,0,90,0,0,0.5,0.5,0.1,0.1,0.1},
- {0,1.85,0,0,0,0,0.5,0.3,0.1,0.1,0.1},
- {0,1.85,0,0,90,0,0.5,0.3,0.1,0.1,0.1}
- }
- for i=1, #ballVisual do
- local p = ballVisual[i]
- local t = Transform(Vec(p[1],p[2],p[3]),QuatEuler(p[4],p[5],p[6]))
- t = TransformToParentTransform(missleTransform,t)
- DrawSprite(shellsprites[projectile.type], transform, p[7], p[8], p[9], p[10], p[11], 1, true, false)
- end
- else
- DrawSprite(shellsprites[projectile.type], transform, width, length, 1, 1, 1, 1, true, false)
- end
- projectile.pos = point2
- end
- function tick(dt)
- for key, shell in ipairs(eairstrikeprojectileHandler.shells) do
- if shell.active then
- ProjectileOperations(shell, dt)
- end
- end
- if flycamenabled then
- SetString("game.player.tool", "eairstrike")
- end
- if GetString("game.player.tool") == "eairstrike" and GetPlayerVehicle() == 0 then
- firing = InputDown("lmb")
- eairstrikeenabled = true
- if equipTimer < 1 then
- equipTimer = equipTimer + dt * 2
- end
- if firing then
- Shoot()
- local p = GetPlayerPos
- if selectedshell == 1 or selectedshell == 6 then
- if selectedshell == 1 then
- PlayLoop(gunsounds[selectedshell], plane.barrel.pos, 0.7)
- PlayLoop(gunsounds[selectedshell], p, 0.5)
- else
- PlayLoop(gunsounds[selectedshell], plane.barrel.pos, 1)
- PlayLoop(gunsounds[selectedshell], p, 1)
- end
- end
- end
- if InputPressed(changeammoKey) then
- PlaySound(switchsound, GetCameraTransform().pos, 0.4)
- if selectedshell == 6 then selectedshell = 1 else selectedshell = selectedshell + 1 end
- end
- if InputPressed(changetypeKey) then
- if ammoselectermax[selectedshell] > 1 then
- PlaySound(switchsound, GetCameraTransform().pos, 0.4)
- if ammoselecter[selectedshell] == ammoselectermax[selectedshell] then ammoselecter[selectedshell] = 1 else ammoselecter[selectedshell] = ammoselecter[selectedshell] + 1 end
- else
- end
- end
- if InputDown(changespreadKey) then
- SetBool("game.input.locktool", true)
- if InputValue("mousewheel") ~= 0 then
- local offset = 0.5 * InputValue("mousewheel")
- bullet_spread = clamp(bullet_spread + offset, 0, 10)
- end
- else
- SetBool("game.input.locktool", false)
- end
- if InputPressed("rmb") then flycamenabled = not flycamenabled end
- if InputPressed("esc") then flycamenabled = false end
- if flycamenabled then FlyCam() end
- aimpos = flycamenabled and GetCamLookPos() or GetAimPos()
- local b = GetToolBody()
- if b ~= 0 then
- toolTrans = GetBodyTransform(b)
- toolPos = TransformToParentPoint(toolTrans, Vec(0.35, -0.6, -2.1))
- if lightTimer > 0 then
- PointLight(plane.barrel.pos, 1, 1, 1, 1)
- lightTimer = lightTimer - dt
- end
- if body ~= b then
- body = b
- local shapes = GetBodyShapes(b)
- radioshape = shapes[1]
- antennashape = shapes[2]
- planeshape = shapes[3]
- blinkshape = shapes[4]
- radiotransformation = GetShapeLocalTransform(radioshape)
- antennatransformation = GetShapeLocalTransform(antennashape)
- planetransformation = GetShapeLocalTransform(planeshape)
- blinktransformation = GetShapeLocalTransform(blinkshape)
- end
- if equipTimer > 1 and not radioactivated then
- PlaySound(beepsound, GetCameraTransform().pos, 0.4)
- radioactivated = true
- end
- if radioactivated then
- SetShapeEmissiveScale(radioshape, 0.5)
- else
- SetShapeEmissiveScale(radioshape, 0)
- end
- if InputDown("lmb") then
- SetShapeEmissiveScale(blinkshape, 5)
- else
- SetShapeEmissiveScale(blinkshape, 0)
- end
- rt = TransformCopy(radiotransformation)
- rt.rot = QuatRotateQuat(rt.rot, QuatEuler(0, 0, -15))
- SetShapeLocalTransform(radioshape, rt)
- bt = TransformCopy(blinktransformation)
- bt.rot = QuatRotateQuat(bt.rot, QuatEuler(0, 0, -15))
- SetShapeLocalTransform(blinkshape, bt)
- at = TransformCopy(antennatransformation)
- at.pos = VecAdd(at.pos, Vec(0, equipTimer*0.4, 0))
- at.rot = QuatRotateQuat(at.rot, QuatEuler(0, 0, -15))
- SetShapeLocalTransform(antennashape, at)
- SetShapeLocalTransform(planeshape, TransformToLocalTransform(GetBodyTransform(GetToolBody()), plane))
- end
- planefwdpos = TransformToParentPoint(plane, Vec(-0.15, 0, 0))
- planerotation = QuatRotateQuat(plane.rot, QuatEuler(0, 0, 0.1))
- plane.pos = planefwdpos
- plane.rot = planerotation
- plane.barrel.pos = TransformToParentPoint(plane, Vec(2.5, 4.5, 0))
- else
- eairstrikeenabled = false
- radioactivated = false
- equipTimer = 0
- end
- for i=1, 6 do
- if shoottimers[i] > 0 then
- shoottimers[i] = shoottimers[i] - dt
- else
- shoottimers[i] = 0
- end
- end
- end
- function draw()
- if flycamenabled and GetPlayerVehicle() == 0 then
- UiPush()
- UiTranslate(UiCenter(), UiMiddle())
- UiColor(1, 1, 1, 0.5)
- UiAlign("center middle")
- UiImage("MOD/img/AC130crosshair"..selectedshell..".png")
- UiPop()
- UiPush()
- UiTranslate(UiCenter(), UiMiddle()+UiMiddle()/2+50)
- UiColor(1, 1, 1)
- UiAlign("center")
- UiFont("regular.ttf", 26)
- if selectedshell ~= 3 or shoottimers[selectedshell] == 0 then
- UiText("Ready")
- else
- UiText(tostring(math.ceil(shoottimers[selectedshell])))
- end
- UiPop()
- end
- if eairstrikeenabled and GetPlayerVehicle() == 0 then
- UiPush()
- UiTranslate(80, UiMiddle()+UiMiddle()/2)
- UiColor(0.4, 0.4, 0.4)
- UiAlign("left")
- UiFont("regular.ttf", 26)
- UiTextOutline(0,0,0,1,0.2)
- UiPush()
- UiColor(1, 1, 1)
- UiTranslate(0, -30)
- UiText("["..changeammoKey.."] Change Ammo")
- UiTranslate(0, 30)
- UiText("["..changetypeKey.."] Change Type")
- UiTranslate(0, 30)
- UiText("["..changespreadKey.."] + [Mouse Wheel] adjust spread: "..bullet_spread.."m")
- UiTranslate(0, 30)
- UiText("Right-Click to Plane-view")
- UiTranslate(0, 20)
- UiText("-----------------------------")
- UiPop()
- UiTranslate(0, 100)
- UiPush()
- if selectedshell == 1 then UiColor(1, 1, 1) end
- UiText("25mm")
- if selectedshell == 1 then
- if ammoselecter[selectedshell] == 1 then
- UiTranslate(70,0)
- UiColor(1,1,1)
- UiText("[HE]")
- elseif ammoselecter[selectedshell] == 2 then
- UiTranslate(70,0)
- UiColor(1,1,1)
- UiText("[FMJ]")
- end
- end
- UiPop()
- UiTranslate(0, 30)
- UiPush()
- if selectedshell == 2 then UiColor(1, 1, 1) end
- UiText("40mm")
- UiPop()
- UiTranslate(0, 30)
- UiPush()
- if selectedshell == 3 then UiColor(1, 1, 1) end
- UiText("105mm")
- UiPop()
- UiTranslate(0, 30)
- UiPush()
- if selectedshell == 4 then UiColor(1, 1, 1) end
- UiText("240mm")
- UiPop()
- UiTranslate(0, 30)
- UiPush()
- if selectedshell == 5 then UiColor(1, 1, 1) end
- UiText("Tactical Nuke")
- UiPop()
- UiTranslate(0, 30)
- UiPush()
- if selectedshell == 6 then UiColor(1, 1, 1) end
- UiText("Napalm")
- UiPop()
- UiPop()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment