RigidChips
Would you like to react to this message? Create an account in a few clicks or log in to continue.

radar

3 posters

Go down

radar Empty radar

Post by mober Wed Sep 19, 2012 9:47 am

Lua
{
--------------------------------------------------
-- •Ï”
--------------------------------------------------
-- ƒXƒCƒbƒ`
gflag = 1 -- ƒMƒA
fflag = -1 -- ƒtƒ‰ƒbƒv
eflag = -1 -- ƒGƒ“ƒWƒ“
dflag = 1 -- „—Í•ÎŒü
tflag = 1 -- ‹@e
aflag = 0 -- ƒI[ƒgƒpƒCƒƒbƒg
rflag = 1 -- ƒŒ[ƒ_[
hflag = -1 -- ƒwƒ‹ƒv
pflag = -1 -- ƒOƒ‰ƒt
iflag = 3 -- ŒvŠí (ƒ‰ƒCƒ“,out)
cflag = 1 -- ƒLƒƒƒmƒs[

-- F (HTML–¼)
red = tonumber("FF0000", 16)
orangered = tonumber("FF4500", 16)
yellow = tonumber("FFFF00", 16)
lime = tonumber("00FF00", 16)
green = tonumber("008000", 16)
deepskyblue = tonumber("00BFFF", 16)
blue = tonumber("0000FF", 16)



--------------------------------------------------
-- OnInit ŠÖ”
--------------------------------------------------
function OnInit()
CANOPY = -45
end



--------------------------------------------------
-- ƒƒCƒ“ŠÖ”
--------------------------------------------------
function main()
px = 2/_HEIGHT() --1px ‚ðŽZo
_ZOOM(zoom)

getcoord()
gun()
gear()

wing()
ELV_L, CNRD_L = elvl*1.5, elvl*2
ELV_R, CNRD_R = elvr*1.5, elvr*2
RUDR, NZL_H = rdr, rdr/2 + 180
ALRN = alrn
FLAP_F, FLAP_R = flp/2, flp

engine()
ENG_L = engl
ENG_R = engr
NZL_VL, NZL_CL = -nzll + 90, nzll + 90
NZL_VR, NZL_CR = nzlr - 90, nzlr + 90

disp()
end



--------------------------------------------------
-- î•ñ•\Ž¦
--------------------------------------------------
zoom = 30 -- CCDƒY[ƒ€
zoomto = zoom -- zoom –Ú•W’l

function disp()
out(0,":: SHC-18 Visohunir ::")
out(1,string.format("FPS : %.1f Weight : %.1f kg Set : %s Speed : %.1f km Gsp : %.1f km Altitude : %.1f m Auto : %s", _FPS(), _WEIGHT(), engtxt, -_VZ()*3.6, -_VZ()*3.6*_FPS()/_BASE(), _Y(), autotxt))

if (_KEYDOWN(16)==1) then
if (_KEY(14)==1) then
zoomto = zoomto*1.5
if (100<zoomto) then
zoomto = 20
end
else
iflag = iflag - 1
if (iflag<0) then
iflag = 3
end
end
end

zoom = zoom + (zoomto-zoom)/2

if (0<iflag) then -- •\Ž¦ƒŒƒxƒ‹0
_SETCOLOR(lime)

-- cursor
move2d(_MX(), _MY() - 6)
line2d(_MX(), _MY() + 6)
move2d(_MX() - 6, _MY())
line2d(_MX() + 6, _MY())

radar(radarsize + 10, _HEIGHT() - radarsize - 20)
status(_WIDTH() - statussize - 10, _HEIGHT() - statussize - 10)

if (1<iflag) then -- •\Ž¦ƒŒƒxƒ‹1
help()
graph()
if (2<iflag) then -- •\Ž¦ƒŒƒxƒ‹2
hud()
end
end
end
end



--------------------------------------------------
-- —ƒ§Œä
--------------------------------------------------
-- PID
i_pitch = 0
i_roll = 0
i_yaw = 0
prev_wx = 0
prev_wy = 0
prev_wz = 0

-- ƒGƒŒƒx[ƒ^
trim = 0
pitchctrl = 0
pitchlim = 0
elvl = 0
elvr = 0

-- ƒGƒ‹ƒƒ“
rollctrl = 0
rolllim = 0
alrn = 0

-- ƒ‰ƒ_[
yawctrl = 0
yawlim = 0
rdr = 0

-- ƒtƒ‰ƒbƒv
flp = 0

-- ƒI[ƒgƒpƒCƒƒbƒg
autotxt = nil

function wing()
-- ƒ†[ƒU[‘€ì (ƒsƒbƒ`)
if (_KEY(0)==1) then
pitchctrl = pitchctrl + 3
pitchlim = 25
elseif (_KEY(1)==1) then
pitchctrl = pitchctrl - 3
pitchlim = 25
else
pitchlim = math.max(math.abs(pitchctrl) - 3, 0)
end
pitchctrl = math.max(-pitchlim, math.min(pitchlim, pitchctrl))

-- ƒ†[ƒU[‘€ì (ƒ[ƒ‹)
if (_KEY(2)==1) then
rollctrl = rollctrl + 2.5
rolllim = 10
elseif (_KEY(3)==1) then
rollctrl = rollctrl - 2.5
rolllim = 10
else
rolllim = math.max(math.abs(rollctrl) - 3, 0)
end
rollctrl = math.max(-rolllim, math.min(rolllim, rollctrl))

-- uƒ†[ƒU[‘€ì (ƒˆ[)
if (_KEY(Cool==1) then
yawctrl = yawctrl + 3
yawlim = 25
elseif (_KEY(9)==1) then
yawctrl = yawctrl - 3
yawlim = 25
else
yawlim = math.max(math.abs(yawctrl) - 3, 0)
end
yawctrl = math.max(-yawlim, math.min(yawlim, yawctrl))

-- ƒtƒ‰ƒbƒvƒAƒbƒv/ƒ_ƒEƒ“
if (_KEYDOWN(12)==1) then
fflag = -fflag
end
if (fflag==1) then
flp = math.min(flp + 1, 30)
else
flp = math.max(flp - 1, 0)
end

-- ƒgƒŠƒ€ƒZƒbƒg
trim = flp*_VZ()*0.0013

-- PID§Œä
if (1.6>math.abs(_H())) and (gflag==1) then
pid_pitch = 0
pid_roll = 0
pid_yaw = 0
else
fbw(_WX()*3, _WY()*5, _WZ()*2)
pid_lim = 2
end

-- ƒI[ƒgƒpƒCƒƒbƒg
if (_KEYDOWN(7)==1) then
aflag = aflag + 1
end
if (2<aflag) then
aflag = 0
end

if (aflag==0) then
autotxt = "Off"
elseif (aflag==1) then
autotxt = "Straight"
fbw(-EX()*20+math.atan2(_VY(),_VZ())*0.2+_WX(), _WY()*5, _EZ()*10)
pid_lim = 5
elseif (aflag==2) then
autotxt = "Circle"
fbw((-math.pi/2-EX())*20, math.pi/2 + _WY()*5, (_EZ()+math.pi/2.5)*10)
pid_lim = 10
end

--[[ PIDŒ‹‰Ê‚ðƒOƒ‰ƒt‚ɏo—Í
linegraph("pitch",pid_pitch, -10, 10, 0, 100, 100, _WIDTH()-200, 50)
linegraph("roll",pid_roll, -10, 10, 0, 100, 100, _WIDTH()-200, 150)
linegraph("yaw",pid_yaw, -10, 10, 0, 100, 100, _WIDTH()-200, 250)]]

-- Še—ƒ‚Ì•Ô‚è’l
elvl = trim + pitchctrl + rollctrl + math.max(-pid_lim, math.min(pid_lim, pid_pitch + pid_roll))
elvr = trim + pitchctrl - rollctrl + math.max(-pid_lim, math.min(pid_lim, pid_pitch - pid_roll))
alrn = rollctrl + pid_roll
rdr = yawctrl + pid_yaw

-- Šp‘¬“x•Û‘¶
prev_wx = _WX()
prev_wy = _WY()
prev_wz = _WZ()

-- —ƒ’[‚̍q‹ó“”
if (math.mod(_TICKS(), 30)==0) then
LIGHT_L, LIGHT_R = tonumber("FFFFFF", 16), tonumber("FFFFFF", 16)
LIGHT_EF = tonumber("0FFF", 16)
else
light = tonumber(string.format("%xFFF", math.abs(math.cos(_TICKS()/15))*15),16)
LIGHT_L = tonumber("FF6666", 16)
LIGHT_R = tonumber("33FFDD", 16)
LIGHT_EF = light
end
end



--------------------------------------------------
-- ƒGƒ“ƒWƒ“§Œä
--------------------------------------------------
-- Žè“®️/‘¬“x§Œä –Ú•W’l
seteng = 0
setspd = 0

-- PID
i_hgt = 0
i_spd = 0
prev_vz = 0

-- ¶‰EƒGƒ“ƒWƒ“ƒpƒ[
engl = 0
engr = 0

-- •ÎŒüƒmƒYƒ‹
nzll = elvr
nzlr = elvl

function engine()
if (_KEY(14)==1) then
if (_KEYDOWN(4)==1) then
eflag = -eflag
end
if (_KEYDOWN(9)==1) then
dflag = -dflag
end
end

-- Žè“®️
if (eflag==-1) then
if (_KEY(4)==1) then
seteng = math.min(seteng + 5000, 200000)
elseif (_KEY(5)==1) then
seteng = math.max(seteng - 5000, 0)
elseif (seteng>150000) then
seteng = seteng - 5000
end
engtxt = math.ceil(seteng/1500).." %"

-- ƒI[ƒgƒXƒƒbƒgƒ‹
elseif (eflag==1) then
if (_KEY(4)==1) then
setspd = math.min(setspd + 10, 500)
elseif (_KEY(5)==1) then
setspd = math.max(setspd - 10, 0)
end
speed = -_VZ()*3.6
spddiff = setspd - speed
autothrottle()
-- ‘¬‚·‚¬‚é‚Æ‚«‚ɃGƒAƒuƒŒ[ƒL“WŠJ
if (spddiff<-3) then
AIR_BRK = math.max(-50, AIR_BRK - 10)
BRK_R = 200
end
engtxt = setspd.." km"
end

-- ƒŠƒ~ƒbƒ_
seteng = math.max(0, math.min(200000, seteng))

-- •Ô‚è’l
if (seteng~=0) then
engl = seteng - pid_yaw*5000 -- ¶ƒGƒ“ƒWƒ“
engr = seteng + pid_yaw*5000 -- ‰EƒGƒ“ƒWƒ“
else
engl = 0
engr = 0
end

-- „—Í•ÎŒü
if (dflag==1) then
nzll = elvr
nzlr = elvl
else
nzll = 0
nzlr = 0
end

-- ƒGƒ“ƒWƒ“•”‚̃JƒEƒ‹ƒGƒtƒFƒNƒg
NZL_CWL = math.min(-110 + seteng/5000/4, -100)
ENG_CWL = rgb(51 + math.max(0, seteng - 150000)/200,51,51)

-- ƒAƒtƒ^[ƒo[ƒi[
for i=1, 4 do
_G["AB_EF"..i] = 61691 - tonumber(string.format("%d0FB", math.max(seteng/10000 - 15 - i, 0)*2), 16)
end
end



function fbw(x, y, z) -- ƒtƒ‰ƒCƒoƒCƒƒCƒ„
-- ƒsƒbƒ`
p_pitch, i_pitch, d_pitch = pid(x, i_pitch, 1, prev_wx, 0.8, 0.8-_VZ()/450, 1.2)
pid_pitch = math.max(-10, math.min(p_pitch + i_pitch + d_pitch, 10))
-- ƒ[ƒ‹
p_roll, i_roll, d_roll = pid(z, i_roll, 1, prev_wz, 0.8, 0.4-_VZ()/450, 0.3+_VZ()/400)
pid_roll = math.max(-10, math.min(p_roll + i_roll + d_roll, 10))
-- ƒˆ[
p_yaw, i_yaw, d_yaw = pid(y, i_yaw, 0.2, prev_wy, 0.9, -_VZ()/700, 0.6+_VZ()/400)
pid_yaw = math.max(-10, math.min(p_yaw + i_yaw + d_yaw, 10))
end



function autothrottle() -- ƒI[ƒgƒXƒƒbƒgƒ‹
p_spd, i_spd, d_spd = pid(spddiff, i_spd, 23000-_VZ()*700, prev_vz, 8000, 200-_VZ()*6, 1000+_VZ()*7)
pid_spd = math.max(-20000, math.min(20000, p_spd + i_spd + d_spd))
seteng = seteng + pid_spd
prev_vz = speed
end



--------------------------------------------------
-- ƒMƒA§Œä (ƒLƒƒƒmƒs[ŠÜ)
--------------------------------------------------
function gear()
if (_KEYDOWN(13)==1) then
if (_KEY(14)==1) then
cflag = -cflag
else
gflag = -gflag
end
end

-- ƒLƒƒƒmƒs[ŠJ•Â
CANOPY = CANOPY + cflag*2

-- ƒMƒAƒAƒbƒv/ƒ_ƒEƒ“
if (gflag==-1) then
GEAR = math.min(GEAR + 2, 180)

if (GEAR==180) then
BRK_F = math.min(BRK_F + 100, 500)
BRK_R = math.min(BRK_R + 100, 500)
end
elseif (gflag==1) then
GEAR = math.max(GEAR - 2, 90)
BRK_F = 0
BRK_R = 0
end

-- ƒ†[ƒU[‘€ì (ƒnƒ“ƒhƒ‹)
if (_KEY(Cool==1) then
HNDL = HNDL - 3
elseif (_KEY(9)==1) then
HNDL = HNDL + 3
elseif (HNDL~=0) then
HNDL = HNDL - ((HNDL)/math.abs(HNDL))*3
end

-- ƒŠƒ~ƒbƒ^[ (ƒnƒ“ƒhƒ‹)
HNDL = math.max(-30, math.min(30, HNDL))

-- ƒuƒŒ[ƒL (ƒGƒAƒuƒŒ[ƒLŠÜ)
if (_KEY(11)==1) then
BRK_R = 300
AIR_BRK = math.max(AIR_BRK - 5, -50)
else
AIR_BRK = math.min(AIR_BRK + 5, 0)
end
end



--------------------------------------------------
-- ‹@e§Œä
--------------------------------------------------
function gun()
if(_KEY(6)==1) then
if (tflag>3) then
tflag = 1
end
-- Œ‚‚Á‚½‚玟‚ÌARM‚֐ؑÖ
if (math.mod(_TICKS(),3)==0) then
_G["GUN_"..tflag] = 30000
tflag = tflag + 1
end
end
end



--------------------------------------------------
-- ƒŒ[ƒ_[
--------------------------------------------------
-- Ý’è
range = 250 -- ƒŒ[ƒ_[ƒŒƒ“ƒW
rangeto = range -- ƒŒ[ƒ_[ƒŒƒ“ƒW–Ú•W’l
radarsize = 80 -- (’PˆÊ:ƒsƒNƒZƒ‹)
dotsize = radarsize*0.12
radarline = 3 --î•ñ•\Ž¦ŠJŽns

-- ’nŒ`î•ñ
scenary = {
-- [ƒ|ƒŠƒSƒ“”] = { {x,z}, ... }, ©️’ljÁ‚³‚ê‚éê‡‚̓Rƒ“ƒ}–Y‚ê‚É’ˆÓ
[5279] = { -- ƒfƒtƒHƒ‹ƒg
{-480,285},{0,285},{480,285},{-330,0},{330,0},{-25,-200},{0,-388}
},
[9675] = { -- !FPS ver1.0
{-25,-155},{-300,-120},{-175,-85},{45,60},{305,240},{130,460},{-130,2080},{-360,1170},
{-395,1355},{-435,1495},{-480,1580},{-500,1610},{-495,1655},{-400,1645},{-495,1570},
{-490,1545},{-480,1525},{-470,1495},{-455,1460},{-445,1420},{-445,1410},{325,1540},
{315,1150},{685,1150},{740,1085},{835,1075}

},
[20687] = { -- Battle of Britain ver0.4
{200,-75},{60,-125},{80,-80},{100,-80},{-30,25},{-17,-125},{-35,-140},{-255,-195},{-270,-177},
{-715,-855},{-685,-935},{-845,-940},{-720,-855},{-1060,-2220},{765,-3450},{815,-3415},
{720,-3415},{845,-3520},{960,-3565},{905,-3455},{3215,-2890},{3285,-2820},{3195,-2820},
{3340,-2930},{4265,-2065},{4305,-2115},{3320,-1185},{3285,-1160},{3275,-1090},{3320,-1220},
{3400,-1110},{3440,-1065},{3385,-1045},{3225,-1040},{3220,-1020},{4040,-720},{4075,-720},
{4115,-720},{-2230,-3420},{-2755,-610},{-2585,-630},{-2630,-525},{-4125,-70},{1945,-15},
{1920,-15},{2030,-115},{1315,-445},{1190,-520},{1345,-540},{2990,-2050},{3120,-2160},{3070,-2045},
},
[37174] = { -- ÁÜŒÎ ver82
{365,-110},{500,210},{318,315},{335,550},{-7,590},{-1435,1615},{-3625,1845},{-3875,1845},
{-4125,1845},{-4215,2747},{-4625,2755},{-4635,2920},{-4475,2825},{-4475,2853},{-4475,2880},
{-4072,3893},{-3805,3878},{-3877,4075},{-3652,4355},{-3578,4155},{-3500,3970},{-3453,3810},
{-4165,6385},{-4695,7155},{-4700,7000},{-6732,5764},{335,3750},{1845,2395},{1350,2355},
{335,1255},{3185,895},{3212,895},{3240,895},{3670,895},{4012,1775},{4012,3620},{4012,1250},
{4012,-1780},{4350,-1655},{-615,-2550},{-615,-2640},{-955,-2760},{-2345,-2100},{-2730,-1080},
{-4350,895},{-1240,1065},{1040,0},{-1300,-910},{2160,-3730},{-410,-210},{530,135}
}
}

-- ‰‰ŽZ—p
minid = 0
maxid = 0
tgtid = 0 -- ƒ^[ƒQƒbƒg‚ÌID
outtgt= 0
oldx = {} -- ‰ß‹Ž‚Ì‘ŠŽèÀ•W
oldy = {}
oldz = {}

function radar(xradar, yradar)
_SETCOLOR(lime)
-- ‰~
move2d(xradar + radarsize/range*250, yradar)
radius = 250

while (radius<=range*1.41) do
for j=0, math.pi*2, math.pi/36 do
line2d(xradar + math.max(-1, math.min(1, radius*math.cos(j)/range))*radarsize, yradar + math.max(-1, math.min(1, radius*math.sin(j)/range))*radarsize)
end
radius = radius*2
end

-- ˜g
move2d(xradar + radarsize, yradar + radarsize)
line2d(xradar + radarsize, yradar - radarsize)
line2d(xradar - radarsize, yradar - radarsize)
line2d(xradar - radarsize, yradar + radarsize)
line2d(xradar + radarsize, yradar + radarsize)
-- ü
move2d(xradar - radarsize, yradar)
line2d(xradar + radarsize, yradar)
move2d(xradar, yradar - radarsize)
line2d(xradar, yradar + radarsize)
-- Ž‹–색ƒCƒ“
move2d(xradar - radarsize*0.75, yradar - radarsize)
line2d(xradar, yradar)
line2d(xradar + radarsize*0.75, yradar - radarsize)
-- •ûˆÊ–ڐ·‚è
for i=_EY() - math.pi, _EY() + math.pi/4, math.pi/2 do
move2d(xradar + radarsize*math.cos(i), yradar - radarsize*math.sin(i))
line2d(xradar + radarsize*math.cos(i)*0.9, yradar - radarsize*math.sin(i)*0.9)
end
-- ƒm[ƒXƒ}[ƒJ[
move2d(xradar + radarsize*math.cos(_EY()+math.pi/2), yradar - radarsize*math.sin(_EY()+math.pi/2))
line2d(xradar + radarsize*math.cos(_EY()+math.pi/2.1)*0.92, yradar - radarsize*math.sin(_EY()+math.pi/2.1)*0.92)
line2d(xradar + radarsize*math.cos(_EY()+math.pi/1.9)*0.92, yradar - radarsize*math.sin(_EY()+math.pi/1.9)*0.92)
line2d(xradar + radarsize*math.cos(_EY()+math.pi/2), yradar - radarsize*math.sin(_EY()+math.pi/2))

-- Œ´“_À•W‚ðƒvƒƒbƒg
_SETCOLOR(tonumber("FFFFFF", 16))
originx, originz = rotator2d(_X()/range*radarsize,_Z()/range*radarsize)

-- ƒŒ[ƒ_[ƒŒƒ“ƒW“àŠO
if (math.abs(originx)<radarsize) and (math.abs(originz)<radarsize) then
move2d(xradar + originx + dotsize*0.8, yradar - originz)
for i=0, math.pi*2, math.pi/3 do
line2d(xradar + originx + dotsize*math.cos(i)*0.8, yradar - originz - dotsize*math.sin(i)*0.Cool
end
else
origang = math.atan2(originz, originx)
originx = math.max(-radarsize, math.min(radarsize, originx))
originz = math.max(-radarsize, math.min(radarsize, originz))
move2d(xradar + originx, yradar - originz)
line2d(xradar + originx + dotsize*math.cos(origang - 0.Cool*0.8, yradar - originz - dotsize*math.sin(origang - 0.Cool*0.Cool
line2d(xradar + originx + dotsize*math.cos(origang + 0.Cool*0.8, yradar - originz - dotsize*math.sin(origang + 0.Cool*0.Cool
line2d(xradar + originx, yradar - originz)
end

-- ’nŒ`ƒvƒƒbƒg
--out(10,_FACE()," { ",_X(),", ", _Z()," }")
snrydat = scenary[_FACE()]
if (snrydat) then
-- ~ˆó•`‰æ
for i,j in ipairs(snrydat) do
snryx, snryy = rotator2d((snrydat[i][1]-_X())/range*radarsize, (snrydat[i][2]-_Z())/range*radarsize)
if (math.abs(snryx)<radarsize) and (math.abs(snryy)<radarsize) then
move2d(xradar - snryx - dotsize*0.5, yradar + snryy - dotsize*0.5)
line2d(xradar - snryx + dotsize*0.5, yradar + snryy + dotsize*0.5)
move2d(xradar - snryx - dotsize*0.5, yradar + snryy + dotsize*0.5)
line2d(xradar - snryx + dotsize*0.5, yradar + snryy - dotsize*0.5)
end
end
end

-- ƒlƒbƒgƒ[ƒNÀ•W
for i=0, _PLAYERS()-1 do
if (_PLAYERID(i)~=_PLAYERMYID()) then

-- ‹——£
-- Å‹ßEÅ‰“ƒvƒŒƒCƒ„[ID
if (dist2d[minid]==nil) or (dist2d[i]<dist2d[minid]) then
minid = i
end
if (dist2d[maxid]==nil) or (dist2d[maxid]<dist2d[i]) then
maxid = i
end

-- ‰ñ“]
rotatedx, rotatedz = rotator2d(-relativex[i]/range*radarsize, -relativez[i]/range*radarsize)

-- X-Z•½–ʏó‚̃xƒNƒgƒ‹ŽZo
if (oldx[i]==nil) then
oldx[i] = playerx[i]
oldy[i] = playery[i]
oldz[i] = playerz[i]
end
move = math.sqrt((playerx[i] - oldx[i])^2 + (playerz[i] - oldz[i])^2)

-- ƒŒ[ƒ_[ƒŒƒ“ƒW“à
if (math.abs(rotatedx)<radarsize) and (math.abs(rotatedz)<radarsize) then
_SETCOLOR(heightcolor(relativey[i]))

-- î•ñ•\Ž¦ out()
if (xradar+rotatedx-dotsize/2<=_MX()) and (_MX()<=xradar+rotatedx+dotsize/2) and (yradar-rotatedz-dotsize/2<=_MY()) and (_MY()<=yradar-rotatedz+dotsize/2) then
_SETCOLOR(orangered)
out(radarline+1, string.format("%.f : %s", i, _PLAYERNAME(i)))

-- ƒNƒŠƒbƒN‚Ń^[ƒQƒbƒg•ÏX
if (_ML()==1) then
if (tgtid==i) then
tgtid = _PLAYERMYID()
else
tgtid = i
end
end
end

-- “®️‚¢‚Ä‚¢‚ê‚Ζîˆó
if (move>0.4) then
pvector = -math.atan2(playerx[i] - oldx[i], playerz[i] - oldz[i]) + _EY() - math.pi/2
move2d(xradar + rotatedx + dotsize*math.cos(pvector), yradar - rotatedz - dotsize*math.sin(pvector))
line2d(xradar + rotatedx + dotsize*math.cos(pvector - math.pi*3/4), yradar - rotatedz - dotsize*math.sin(pvector - math.pi*3/4))
line2d(xradar + rotatedx - dotsize*math.cos(pvector)/4, yradar - rotatedz - dotsize*math.sin(pvector)/4)
line2d(xradar + rotatedx + dotsize*math.cos(pvector + math.pi*3/4), yradar - rotatedz - dotsize*math.sin(pvector + math.pi*3/4))
line2d(xradar + rotatedx + dotsize*math.cos(pvector), yradar - rotatedz - dotsize*math.sin(pvector))
-- Ž~‚Ü‚Á‚Ä‚¢‚ê‚ÎŽlŠp
else
pvector = -math.pi/2
move2d(xradar + rotatedx + dotsize/2, yradar - rotatedz - dotsize/2)
line2d(xradar + rotatedx + dotsize/2, yradar - rotatedz + dotsize/2)
line2d(xradar + rotatedx - dotsize/2, yradar - rotatedz + dotsize/2)
line2d(xradar + rotatedx - dotsize/2, yradar - rotatedz - dotsize/2)
line2d(xradar + rotatedx + dotsize/2, yradar - rotatedz - dotsize/2)
end

_SETCOLOR(_PLAYERCOLOR(i))
-- ARM‚È‚µ‚È‚ç~•`‰æ
if (_PLAYERARMS(i)==0) then
move2d(xradar + rotatedx + dotsize*math.cos(pvector - math.pi*1/4)/2, yradar - rotatedz - dotsize*math.sin(pvector - math.pi*1/4)/2)
line2d(xradar + rotatedx + dotsize*math.cos(pvector + math.pi*3/4)/2, yradar - rotatedz - dotsize*math.sin(pvector + math.pi*3/4)/2)
move2d(xradar + rotatedx + dotsize*math.cos(pvector + math.pi*1/4)/2, yradar - rotatedz - dotsize*math.sin(pvector + math.pi*1/4)/2)
line2d(xradar + rotatedx + dotsize*math.cos(pvector - math.pi*3/4)/2, yradar - rotatedz - dotsize*math.sin(pvector - math.pi*3/4)/2)
-- ARM‚ ‚è‚È‚ç{•`‰æ
else
move2d(xradar + rotatedx + dotsize*math.cos(pvector - math.pi/2)/2, yradar - rotatedz - dotsize*math.sin(pvector - math.pi/2)/2)
line2d(xradar + rotatedx + dotsize*math.cos(pvector + math.pi/2)/2, yradar - rotatedz - dotsize*math.sin(pvector + math.pi/2)/2)
move2d(xradar + rotatedx - dotsize*math.cos(pvector)/2, yradar - rotatedz + dotsize*math.sin(pvector)/2)
line2d(xradar + rotatedx + dotsize*math.cos(pvector)/2, yradar - rotatedz - dotsize*math.sin(pvector)/2)
end

-- ƒŒ[ƒ_[ƒŒƒ“ƒWŠO
else
rltvang = math.atan2(rotatedz, rotatedx)

-- ƒŒ[ƒ_[’[‚ɕ␳
rotatedx = math.max(-radarsize, math.min(radarsize, rotatedx))
rotatedz = math.max(-radarsize, math.min(radarsize, rotatedz))

_SETCOLOR(_PLAYERCOLOR(i))
move2d(xradar + rotatedx - dotsize*math.cos(rltvang)*1.1, yradar - rotatedz + dotsize*math.sin(rltvang)*1.1)
line2d(xradar + rotatedx, yradar - rotatedz)

-- –îˆó•`‰æ
_SETCOLOR(heightcolor(relativey[i]))
line2d(xradar + rotatedx - dotsize*math.cos(rltvang - 0.3)*1.7, yradar - rotatedz + dotsize*math.sin(rltvang - 0.3)*1.7)
line2d(xradar + rotatedx - dotsize*math.cos(rltvang + 0.3)*1.7, yradar - rotatedz + dotsize*math.sin(rltvang + 0.3)*1.7)
line2d(xradar + rotatedx, yradar - rotatedz)
end

-- ƒ^[ƒQƒbƒg‚Ȃ灛ˆÍ‚Ý
if (tgtid==i) then
_SETCOLOR(yellow)
move2d(xradar + rotatedx + dotsize, yradar - rotatedz)
for j=0, math.pi*2, math.pi/12 do
line2d(xradar + rotatedx + dotsize*math.cos(j), yradar - rotatedz - dotsize*math.sin(j))
end

out(radarline, string.format("[%.f : %s] Chips : %.f Arms : %.f Distance : %.f m Alt : %.f m Gsp : %.1f km", tgtid, _PLAYERNAME(tgtid), _PLAYERCHIPS(tgtid), _PLAYERARMS(tgtid), dist3d[i], playery[i], math.sqrt((playerx[i]-oldx[i])^2+(playery[i]-oldy[i])^2+(playerz[i]-oldz[i])^2)*_FPS()))
end

-- ƒvƒŒƒCƒ„[À•W‚Ì•Û‘¶
oldx[i] = playerx[i]
oldy[i] = playery[i]
oldz[i] = playerz[i]
end
end

-- ƒŒƒ“ƒW•ÏX Žè“®️©️®️ Ø‘Öƒ{ƒ^ƒ“
if (button("radarauto", xradar-radarsize, yradar+radarsize, radarsize*0.5, 10)==true) then
rflag = 1
elseif (button("radarmanual", xradar-radarsize*0.5, yradar+radarsize, radarsize*0.5, 10)==true) then
rflag = -1
end

-- ŠŠ‚ç‚©️‚ɃŒƒ“ƒW•ÏX
range = range + (rangeto - range)/3

-- ƒŒ[ƒ_[ƒŒƒ“ƒW’l‚ð•\Ž¦
_SETCOLOR(lime)
font2d(rangeto, xradar + 5, yradar + radarsize + 2, 6)
move2d(xradar + radarsize, yradar + radarsize)
line2d(xradar + radarsize, yradar + radarsize + 10)
line2d(xradar, yradar + radarsize + 10)

-- Žè“®️
if (rflag==-1) then
if (_KEYDOWN(15)==1) then
if (_KEY(14)==1) then
rangeto = rangeto/2
else
rangeto = rangeto*2
end
end
if (rangeto<250) then
rangeto = 32000
elseif (32000<rangeto) then
rangeto = 250
end
font2d("MANUAL", xradar - radarsize/2 + 4, yradar + radarsize + 2, 6)
-- Ž©️®️
elseif (rflag==1) then
if (1<_PLAYERS()) then
mindist = dist2d[minid]
maxdist = dist2d[maxid]
else
mindist = math.sqrt(_X()^2 + _Z()^2)
maxdist = math.sqrt(_X()^2 + _Z()^2)
end

if (maxdist<rangeto/2) and (250<rangeto) then
rangeto = rangeto/2
elseif (rangeto<mindist) and (rangeto<64000) then
rangeto = rangeto*2
end
font2d("AUTO", xradar - radarsize + 4, yradar + radarsize + 2, 6)
end
end



--------------------------------------------------
-- ƒXƒe[ƒ^ƒX•\Ž¦
--------------------------------------------------
-- Ý’è
statussize = 80 -- (’PˆÊ:ƒsƒNƒZƒ‹)

function status(xstatus, ystatus)
-- ‹@Žñ(¶”¼•ª)
move2d(xstatus, ystatus - statussize)
chktop = checkdamage(TOP, 1)
line2d(xstatus - statussize*0.06, ystatus - statussize*0.Cool
chkhead = checkdamage(HEAD, 1)
line2d(xstatus - statussize*0.08, ystatus - statussize*0.55)
checkdamage(LEFTCANARD, 1)
line2d(xstatus - statussize*0.2, ystatus - statussize*0.18)

-- ¶Žå—ƒ
chkflaplf = checkdamage(LEFTFLAP_F, 1)
line2d(xstatus - statussize*0.5, ystatus + statussize*0.14)
checkdamage(LEFTWING, 1)
line2d(xstatus - statussize*0.67, ystatus + statussize*0.3)
line2d(xstatus - statussize*0.65, ystatus + statussize*0.5)
checkdamage(LEFTAILERON, 1)
line2d(xstatus - statussize*0.45, ystatus + statussize*0.46)
chkflaplr = checkdamage(LEFTFLAP_R, 1)
line2d(xstatus - statussize*0.15, ystatus + statussize*0.4)
chkconnect = checkdamage(CONNECT, 1)
line2d(xstatus - statussize*0.15, ystatus + statussize*0.58)

-- ¶ƒGƒŒƒx[ƒ^
checkdamage(LEFTELEVATOR, 1)
line2d(xstatus - statussize*0.4, ystatus + statussize*0.Cool
line2d(xstatus - statussize*0.39, ystatus + statussize*0.95)
line2d(xstatus - statussize*0.16, ystatus + statussize*0.9)

-- ƒGƒ“ƒWƒ“
checkdamage(LEFTENGINE, 1)
line2d(xstatus - statussize*0.15, ystatus + statussize*0.84)
line2d(xstatus - statussize*0.03, ystatus + statussize*0.84)
checkdamage(TAIL, 1)
line2d(xstatus - statussize*0.02, ystatus + statussize*0.96)
line2d(xstatus, ystatus + statussize)
line2d(xstatus + statussize*0.02, ystatus + statussize*0.96)
line2d(xstatus + statussize*0.03, ystatus + statussize*0.84)
checkdamage(RIGHTENGINE, 1)
line2d(xstatus + statussize*0.15, ystatus + statussize*0.84)
line2d(xstatus + statussize*0.16, ystatus + statussize*0.9)

-- ‰EƒGƒŒƒx[ƒ^
checkdamage(RIGHTELEVATOR, 1)
line2d(xstatus + statussize*0.39, ystatus + statussize*0.95)
line2d(xstatus + statussize*0.4, ystatus + statussize*0.Cool
line2d(xstatus + statussize*0.15, ystatus + statussize*0.58)
_SETCOLOR(chkconnect)
line2d(xstatus + statussize*0.15, ystatus + statussize*0.4)

-- ‰EŽå—ƒ
chkflaprr = checkdamage(RIGHTFLAP_R, 1)
line2d(xstatus + statussize*0.45, ystatus + statussize*0.46)
checkdamage(RIGHTAILERON, 1)
line2d(xstatus + statussize*0.66, ystatus + statussize*0.5)
checkdamage(RIGHTWING, 1)
line2d(xstatus + statussize*0.67, ystatus + statussize*0.3)
line2d(xstatus + statussize*0.5, ystatus + statussize*0.14)
chkflaprf = checkdamage(RIGHTFLAP_F, 1)
line2d(xstatus + statussize*0.2, ystatus - statussize*0.18)

-- ‹@Žñ(‰E”¼•ª)
checkdamage(RIGHTCANARD, 1)
line2d(xstatus + statussize*0.08, ystatus - statussize*0.55)
_SETCOLOR(chkhead)
line2d(xstatus + statussize*0.06, ystatus - statussize*0.Cool
_SETCOLOR(chktop)
line2d(xstatus, ystatus - statussize)

-- ¶ƒ‰ƒ_[
checkdamage(LEFTRUDDER, 1)
move2d(xstatus - statussize*0.1, ystatus + statussize*0.55)
line2d(xstatus - statussize*0.12, ystatus + statussize*0.55)
line2d(xstatus - statussize*0.12, ystatus + statussize*0.Cool
line2d(xstatus - statussize*0.1, ystatus + statussize*0.Cool
line2d(xstatus - statussize*0.1, ystatus + statussize*0.55)

-- ‰Eƒ‰ƒ_[
checkdamage(RIGHTRUDDER, 1)
move2d(xstatus + statussize*0.1, ystatus + statussize*0.55)
line2d(xstatus + statussize*0.12, ystatus + statussize*0.55)
line2d(xstatus + statussize*0.12, ystatus + statussize*0.Cool
line2d(xstatus + statussize*0.1, ystatus + statussize*0.Cool
line2d(xstatus + statussize*0.1, ystatus + statussize*0.55)

-- ƒtƒ‰ƒbƒv
_SETCOLOR(chkflaplr)
move2d(xstatus - statussize*0.15, ystatus + statussize*0.4)
line2d(xstatus - statussize*0.15, ystatus + statussize*0.3)
line2d(xstatus - statussize*0.45, ystatus + statussize*0.36)
line2d(xstatus - statussize*0.45, ystatus + statussize*0.46)

_SETCOLOR(chkflaprr)
move2d(xstatus + statussize*0.15, ystatus + statussize*0.4)
line2d(xstatus + statussize*0.15, ystatus + statussize*0.3)
line2d(xstatus + statussize*0.45, ystatus + statussize*0.36)
line2d(xstatus + statussize*0.45, ystatus + statussize*0.46)
if (fflag==1) then
for i=0.3, 0.38, px*6 do
if (chkflaplr~=red) then
_SETCOLOR(chkflaplr)
move2d(xstatus - statussize*0.15, ystatus + statussize*i)
line2d(xstatus - statussize*0.45, ystatus + statussize*(i+0.06))
end
if (chkflaprr~=red) then
_SETCOLOR(chkflaprr)
move2d(xstatus + statussize*0.15, ystatus + statussize*i)
line2d(xstatus + statussize*0.45, ystatus + statussize*(i+0.06))
end
end
end

-- ƒMƒAƒAƒbƒv/ƒ_ƒEƒ“Žž
if (90~=GEAR) and (GEAR~=180) then
gcolor = yellow
else
gcolor = lime
end

-- ƒtƒƒ“ƒgƒMƒA
_SETCOLOR(gcolor)
chk_fgear = checkdamage(FRONTGEAR)
move2d(xstatus - statussize*0.05, ystatus - statussize*0.35)
line2d(xstatus - statussize*0.05, ystatus - statussize*0.26)
line2d(xstatus + statussize*0.05, ystatus - statussize*0.26)
line2d(xstatus + statussize*0.05, ystatus - statussize*0.35)
line2d(xstatus - statussize*0.05, ystatus - statussize*0.35)

-- ¶ƒŠƒAƒMƒA
_SETCOLOR(gcolor)
chk_lgear = checkdamage(LEFTGEAR)
move2d(xstatus - statussize*0.12, ystatus + statussize*0.31)
line2d(xstatus - statussize*0.12, ystatus + statussize*0.4)
line2d(xstatus - statussize*0.02, ystatus + statussize*0.4)
line2d(xstatus - statussize*0.02, ystatus + statussize*0.31)
line2d(xstatus - statussize*0.12, ystatus + statussize*0.31)

-- ‰EƒŠƒAƒMƒA
_SETCOLOR(gcolor)
chk_rgear = checkdamage(RIGHTGEAR)
move2d(xstatus + statussize*0.12, ystatus + statussize*0.31)
line2d(xstatus + statussize*0.12, ystatus + statussize*0.4)
line2d(xstatus + statussize*0.02, ystatus + statussize*0.4)
line2d(xstatus + statussize*0.02, ystatus + statussize*0.31)
line2d(xstatus + statussize*0.12, ystatus + statussize*0.31)

if (gflag==1) then
for i=0.26, 0.35, px*6 do
if (chk_fgear~=red) then
_SETCOLOR(gcolor)
move2d(xstatus - statussize*0.05, ystatus - statussize*i)
line2d(xstatus + statussize*0.05, ystatus - statussize*i)
end
if (chk_lgear~=red) then
_SETCOLOR(gcolor)
move2d(xstatus - statussize*0.12, ystatus + statussize*(i + 0.05))
line2d(xstatus - statussize*0.02, ystatus + statussize*(i + 0.05))
end
if (chk_rgear~=red) then
_SETCOLOR(gcolor)
move2d(xstatus + statussize*0.12, ystatus + statussize*(i + 0.05))
line2d(xstatus + statussize*0.02, ystatus + statussize*(i + 0.05))
end
end
end

-- ƒAƒtƒ^[ƒo[ƒi[ON/OFF
if (seteng>=160000) then
ecolor = orangered
else
ecolor = lime
end

-- ¶ƒGƒ“ƒWƒ“
_SETCOLOR(ecolor)
chk_leng = checkdamage(LEFTENGINE)
move2d(xstatus - statussize*0.9, ystatus)
line2d(xstatus - statussize*0.9, ystatus + statussize)

move2d(xstatus - statussize*0.95, ystatus)
line2d(xstatus - statussize*0.85, ystatus)
move2d(xstatus - statussize*0.95, ystatus + statussize*0.5)
line2d(xstatus - statussize*0.85, ystatus + statussize*0.5)
move2d(xstatus - statussize*0.95, ystatus + statussize)
line2d(xstatus - statussize*0.85, ystatus + statussize)

move2d(xstatus - statussize*0.93, ystatus + statussize*0.25)
line2d(xstatus - statussize*0.87, ystatus + statussize*0.25)

-- ƒQ[ƒW
if (chk_leng~=red) then
for i=0.85, 0.9, px do
move2d(xstatus - statussize*i, ystatus + statussize)
line2d(xstatus - statussize*i, ystatus - statussize*(ENG_L/200000 - 1))
end
line2d(xstatus - statussize*0.98, ystatus - statussize*(ENG_L/200000 - 0.95))
line2d(xstatus - statussize*0.98, ystatus - statussize*(ENG_L/200000 - 1.05))
line2d(xstatus - statussize*0.9, ystatus - statussize*(ENG_L/200000 - 1))
else
-- JET‚ª‚Ƃꂽ‚Æ‚«ƒJƒEƒ‹ƒmƒYƒ‹•ª—£
dummy = _BYE(LEFTNOZZLE)
end

-- ‰EƒGƒ“ƒWƒ“
_SETCOLOR(ecolor)
chk_reng = checkdamage(RIGHTENGINE)
move2d(xstatus + statussize*0.9, ystatus)
line2d(xstatus + statussize*0.9, ystatus + statussize)

move2d(xstatus + statussize*0.95, ystatus)
line2d(xstatus + statussize*0.85, ystatus)
move2d(xstatus + statussize*0.95, ystatus + statussize*0.5)
line2d(xstatus + statussize*0.85, ystatus + statussize*0.5)
move2d(xstatus + statussize*0.95, ystatus + statussize)
line2d(xstatus + statussize*0.85, ystatus + statussize)

move2d(xstatus + statussize*0.93, ystatus + statussize*0.25)
line2d(xstatus + statussize*0.87, ystatus + statussize*0.25)

-- ƒQ[ƒW
if (chk_reng~=red) then
for i=0.85, 0.9, px do
move2d(xstatus + statussize*i, ystatus + statussize)
line2d(xstatus + statussize*i, ystatus - statussize*(ENG_R/200000 - 1))
end
line2d(xstatus + statussize*0.98, ystatus - statussize*(ENG_R/200000 - 0.95))
line2d(xstatus + statussize*0.98, ystatus - statussize*(ENG_R/200000 - 1.05))
line2d(xstatus + statussize*0.9, ystatus - statussize*(ENG_R/200000 - 1))
else
-- JET‚ª‚Ƃꂽ‚Æ‚«ƒJƒEƒ‹ƒmƒYƒ‹•ª—£
dummy = _BYE(RIGHTNOZZLE)
end
end



--------------------------------------------------
-- ƒwƒ‹ƒv•\Ž¦
--------------------------------------------------
-- Ý’è
outhlp = 3 -- •\Ž¦ŠJŽns
hlpsize = {12, 120} -- •{Žû”[Žž, “WŠJŽž}

-- ‰‰ŽZ—p
helptxt = {
"[A] autopilot",
"[S/D] yaw",
"[Q+D] deflection",
"[F] flap",
"[G] gear",
"[Q+G] canopy",
"[Z/X] power",
"[Q+Z] pow ctrl",
"[C] gun",
"[B] brake",
"[W] range +",
"[Q+W] range -",
"[E] disp lev",
"[Q+E] zoom pow"
}
hlplines = table.getn(helptxt)
hlplim = hlpsize[1]

function help()
_SETCOLOR(lime)

-- ƒ{ƒ^ƒ“
if (button("help", -1, lineout(outhlp), hlpsize[1], lineout(hlplines-1))==true) then
hflag = -hflag
end

-- –îˆó
move2d(1, lineout(outhlp) + 5)
line2d(8, lineout(outhlp) + 10)
line2d(1, lineout(outhlp) + 15)
line2d(1, lineout(outhlp) + 5)

font2d("H", 2, lineout(outhlp + 2))
font2d("E", 2, lineout(outhlp + 3))
font2d("L", 2, lineout(outhlp + 4))
font2d("P", 2, lineout(outhlp + 5))

-- ƒwƒ‹ƒvƒEƒBƒ“ƒhƒE‚ªŠJ‚¢‚Ä‚¢‚ê‚Ε\Ž¦
if (hflag==1) then
hlplim = math.min(hlplim + 15, hlpsize[2])
if (hlplim==hlpsize[2]) then
for i=1, hlplines do
out(outhlp + i - 1, helptxt[i])
end
end
else
hlplim = math.max(hlplim - 15, hlpsize[1])
end

-- ˜g
if (hlplim~=hlpsize[1]) then
_SETCOLOR(lime)
move2d(hlpsize[1], lineout(outhlp))
line2d(hlplim, lineout(outhlp))
line2d(hlplim, lineout(outhlp + hlplines))
line2d(hlpsize[1], lineout(outhlp + hlplines))
end
end



--------------------------------------------------
-- ‘¬“xƒOƒ‰ƒt
--------------------------------------------------
-- Ý’è (ƒfƒtƒHƒ‹ƒg:ƒwƒ‹ƒv“¯Šú)
outgrp = outhlp -- •\Ž¦ŠJŽns
grplines = hlplines -- ‚‚³
grpsize = {hlpsize[1], grplines} -- •{Žû”[Žž(ƒsƒNƒZƒ‹), “WŠJŽž(s)}

-- ‰‰ŽZ—p
grplim = grpsize[1] -- •

function graph()
_SETCOLOR(lime)

-- ƒ{ƒ^ƒ“
if (button("graph", _WIDTH()-grpsize[1], lineout(outgrp), grpsize[1], lineout(grplines-1))==true) then
pflag = -pflag
end

-- –îˆó
move2d(2, lineout(outgrp) + 5, -1)
line2d(9, lineout(outgrp) + 10, -1)
line2d(2, lineout(outgrp) + 15, -1)
line2d(2, lineout(outgrp) + 5, -1)

font2d("G", _WIDTH()-8, lineout(outgrp + 2))
font2d("R", _WIDTH()-8, lineout(outgrp + 3))
font2d("A", _WIDTH()-8, lineout(outgrp + 4))
font2d("P", _WIDTH()-8, lineout(outgrp + 5))
font2d("H", _WIDTH()-8, lineout(outgrp + 6))

if (pflag==1) then
grplim = math.min(grplim + 15, lineout(grplines))
if (grplim==lineout(grplines)) then
if (eflag==1) then
spdbase = setspd
else
spdbase = 0
end
linegraph("Speed", -_VZ()*3.6, -100, 500, spdbase, 300, lineout(grplines - 1), _WIDTH()-lineout(grpsize[2]), lineout(outgrp))
end
else
grplim = math.max(grplim - 15, grpsize[1])
end

-- ˜g
if (grplim~=grpsize[1]) then
_SETCOLOR(lime)
move2d(grpsize[1], lineout(outgrp), -1)
line2d(grplim, lineout(outgrp), -1)
line2d(grplim, lineout(outgrp + grplines), -1)
line2d(grpsize[1], lineout(outgrp + grplines), -1)
end

end



--------------------------------------------------
-- HUD
--------------------------------------------------
-- Ý’è
hudsize = 0.55 -- (’PˆÊ:ƒsƒNƒZƒ‹)
boxsize = hudsize*0.036 -- ƒ^[ƒQƒbƒgƒ{ƒbƒNƒX‚Ì‘å‚«‚³
lenarr = 0.3 -- “G‹@–îˆóƒTƒCƒY

-- ‰‰ŽZ—p
zlength = 0.724 -- math.abs(0.3 + 0.6*math.cos(math.rad(45)))
ybox = 0.12 -- ƒ^[ƒQƒbƒgƒ{ƒbƒNƒX•\Ž¦À•W•â³
ymonitor = 0.5 -- ƒRƒA-ƒ‚ƒjƒ^ŠÔYÀ•W•â³
compass = {"E","SE","S","SW","W","NW","N","NE","E","SE","S","SW","W"} -- HUD•ûˆÊ•\Ž¦—p
prev_y = _Y()

function hud()
_SETCOLOR(lime)

-- ˜g
move3d(-hudsize*1.2, ymonitor + hudsize)
line3d(-hudsize*1.2, ymonitor - hudsize)
for i=-1, 1, 0.5 do
move3d(-hudsize*1.1, ymonitor + hudsize*i)
line3d(-hudsize*1.2, ymonitor + hudsize*i)
end
move3d(hudsize*1.1, ymonitor + hudsize)
line3d(hudsize*1.2, ymonitor + hudsize)
line3d(hudsize*1.2, ymonitor - hudsize)
line3d(hudsize*1.1, ymonitor - hudsize)

-- ’†S“_
move3d(-hudsize*0.11, ymonitor-hudsize*0.1)
line3d(-hudsize*0.08, ymonitor-hudsize*0.1)
line3d(-hudsize*0.04, ymonitor-hudsize*0.19)
line3d(0, ymonitor-hudsize*0.1)
line3d(hudsize*0.04, ymonitor-hudsize*0.19)
line3d(hudsize*0.08, ymonitor-hudsize*0.1)
line3d(hudsize*0.11, ymonitor-hudsize*0.1)

-- ƒxƒƒVƒeƒBƒxƒNƒgƒ‹
vvecx = -_VX()/45
vvecy = _VY()/40
move3d(vvecx + -hudsize*0.12, ymonitor + vvecy)
for i=-math.pi, math.pi, math.pi/12 do
line3d(vvecx + hudsize*math.cos(i)*0.05, ymonitor + vvecy + hudsize*math.sin(i)*0.05)
end
move3d(vvecx, ymonitor + vvecy + hudsize*0.05)
line3d(vvecx, ymonitor + vvecy + hudsize*0.12)
move3d(vvecx + hudsize*0.05, ymonitor + vvecy)
line3d(vvecx + hudsize*0.12, ymonitor + vvecy)

-- ‘¬“xŒv
font3d("SPEED", -hudsize*2, ymonitor + hudsize*0.13, hudsize*0.13)
font3d(string.format("%04d", math.abs(-_VZ())*3.6), -hudsize*1.95, ymonitor - hudsize*0.08, hudsize*0.14, 0.Cool
move3d(-hudsize*2, ymonitor + hudsize*0.1)
line3d(-hudsize*1.5, ymonitor + hudsize*0.1)
line3d(-hudsize*1.4, ymonitor)
line3d(-hudsize*1.5, ymonitor - hudsize*0.1)
line3d(-hudsize*2, ymonitor - hudsize*0.1)
line3d(-hudsize*2, ymonitor + hudsize*0.1)

vzbase = roundnum(_VZ()*3.6, 10)
for i=-40, 40, 2 do
if (math.abs(i+vzbase)<hudsize*40) then
if (math.mod(i,10)==0) then
move3d(-hudsize*1.4, ymonitor + (i + vzbase)*hudsize*0.02)
else
move3d(-hudsize*1.3, ymonitor + (i + vzbase)*hudsize*0.02)
end
line3d(-hudsize*1.2, ymonitor + (i + vzbase)*hudsize*0.02)
end
end

-- ‚“xŒv
font3d("ALT", hudsize*1.5, ymonitor + hudsize*0.13, hudsize*0.13)
font3d(string.format("%05d", math.abs(-_Y())), hudsize*1.55, ymonitor - hudsize*0.08, hudsize*0.14, 0.Cool
move3d(hudsize*2.1, ymonitor + hudsize*0.1)
line3d(hudsize*1.5, ymonitor + hudsize*0.1)
line3d(hudsize*1.4, ymonitor)
line3d(hudsize*1.5, ymonitor - hudsize*0.1)
line3d(hudsize*2.1, ymonitor - hudsize*0.1)
line3d(hudsize*2.1, ymonitor + hudsize*0.1)

altbase = -roundnum(_Y(), 10)
for i=-40, 40, 2 do
if (math.abs(i+altbase)<hudsize*40) then
if (math.mod(i,10)==0) then
move3d(hudsize*1.4, ymonitor + (i + altbase)*hudsize*0.02)
else
move3d(hudsize*1.3, ymonitor + (i + altbase)*hudsize*0.02)
end
line3d(hudsize*1.2, ymonitor + (i + altbase)*hudsize*0.02)
end
end

-- •ûˆÊŽwŽ¦Ší
font3d(string.format("%03d", math.deg(_EY()+math.pi)), -hudsize*0.13, ymonitor + hudsize*1.05, hudsize*0.13)
move3d(-hudsize*0.18, ymonitor + hudsize*1.2)
line3d(hudsize*0.18, ymonitor + hudsize*1.2)
line3d(hudsize*0.18, ymonitor + hudsize*1.02)
line3d(-hudsize*0.18, ymonitor + hudsize*1.02)
line3d(-hudsize*0.18, ymonitor + hudsize*1.2)

direction = math.deg(_EY()+math.pi)
cmpbase = -roundnum(direction, 45)
for i=-180, 180, 15 do
if (math.abs(i+cmpbase)<hudsize*180) and (hudsize*50<math.abs(i+cmpbase)) then
if (math.mod(i,45)==0) then
font3d(compass[math.ceil((i+direction)/45)+2], (i + cmpbase)*hudsize*0.01, ymonitor + hudsize*1.06, hudsize*0.1)
else
move3d((i + cmpbase)*hudsize*0.01, ymonitor + hudsize*1.14)
line3d((i + cmpbase)*hudsize*0.01, ymonitor + hudsize*1.08)
end
end
end

-- Žp¨ŽwŽ¦Ší
for i=EX()-math.pi/2, EX()+math.pi/2, math.pi/36 do
ygyro = i*math.pi

if (math.abs(i)<math.pi/20) then
if (EX()-math.pi/360<=i) and (i<=EX()+math.pi/360) then
crow = 0
elseif (EX()<i) then
crow = -hudsize*0.08
elseif (i<EX()) then
crow = hudsize*0.08
end

move3d(-hudsize*0.7*math.cos(_EZ()) - (ygyro+crow)*math.sin(_EZ()), ymonitor - hudsize*0.7*math.sin(_EZ()) + (ygyro+crow)*math.cos(_EZ()))
line3d(-hudsize*0.7*math.cos(_EZ()) - ygyro*math.sin(_EZ()), ymonitor - hudsize*0.7*math.sin(_EZ()) + ygyro*math.cos(_EZ()))
line3d(-hudsize*0.3*math.cos(_EZ()) - ygyro*math.sin(_EZ()), ymonitor - hudsize*0.3*math.sin(_EZ()) + ygyro*math.cos(_EZ()))
move3d(hudsize*0.3*math.cos(_EZ()) - ygyro*math.sin(_EZ()), ymonitor + hudsize*0.3*math.sin(_EZ()) + ygyro*math.cos(_EZ()))
line3d(hudsize*0.7*math.cos(_EZ()) - ygyro*math.sin(_EZ()), ymonitor + hudsize*0.7*math.sin(_EZ()) + ygyro*math.cos(_EZ()))
line3d(hudsize*0.7*math.cos(_EZ()) - (ygyro+crow)*math.sin(_EZ()), ymonitor + hudsize*0.7*math.sin(_EZ()) + (ygyro+crow)*math.cos(_EZ()))

font3d(string.format("%02d", math.abs(math.ceil(math.deg(i-EX())))),-hudsize*0.9*math.cos(_EZ()) - ygyro*math.sin(_EZ()), ymonitor - hudsize*0.9*math.sin(_EZ()) + ygyro*math.cos(_EZ()), hudsize*0.1)
font3d(string.format("%02d", math.abs(math.ceil(math.deg(i-EX())))),hudsize*0.8*math.cos(_EZ()) - ygyro*math.sin(_EZ()), ymonitor + hudsize*0.9*math.sin(_EZ()) + ygyro*math.cos(_EZ()), hudsize*0.1)
end
end

-- o—ÍŒv
move3d(-hudsize*1.15, ymonitor + hudsize*(seteng*0.00001 - 1))
line3d(-hudsize*1.15, ymonitor - hudsize)

-- ¸~Œv
yaccel = _Y() - prev_y
move3d(hudsize*1.1, ymonitor + hudsize*yaccel*0.2)
line3d(hudsize*1.2, ymonitor + hudsize*yaccel*0.2)
prev_y = _Y()

-- ƒ^[ƒQƒbƒgƒ{ƒbƒNƒX (À•WŠÖ˜AƒAƒ‰ƒ“=ƒXƒ~ƒV[Ž‚æ‚è‹Zp’ñ‹Ÿ)
for i=0, _PLAYERS()-1 do
if (_PLAYERID(i)~=_PLAYERMYID()) then
-- ƒ[ƒJƒ‹‰»À•W
rot3dx, rot3dy, rot3dz = worldlocal(relativex[i], relativey[i], relativez[i])

-- “Š‰e—pÀ•W (‘ŠŽ—)
tgtx = -(zlength + 0.75)/(rot3dz + 0.75)*rot3dx
tgty = (zlength + 0.75)/(rot3dz + 0.75)*rot3dy
tgtang = -math.atan2(rot3dy, rot3dx) - math.pi

-- Ž‹–ì“à‚È‚çƒ{ƒbƒNƒX
if (math.abs(tgtx)<zoom*0.015) and (math.abs(tgty)<zoom*0.015) and (0>=rot3dz) then --
_SETCOLOR(lime)
font3d(string.format("%03d", math.abs(dist3d[i])),-4*(tgtx - boxsize*1.2), 4*(ybox -tgty + boxsize*0.4), hudsize*0.13)
font3d(string.upper(_PLAYERNAME(i)), -4*(tgtx - boxsize*1.2), 4*(ybox -tgty - boxsize), hudsize*0.13)
move3d(-4*(tgtx - boxsize), 4*(ybox -tgty + boxsize))
line3d(-4*(tgtx + boxsize), 4*(ybox -tgty + boxsize))
line3d(-4*(tgtx + boxsize), 4*(ybox -tgty - boxsize))
line3d(-4*(tgtx - boxsize), 4*(ybox -tgty - boxsize))
line3d(-4*(tgtx - boxsize), 4*(ybox -tgty + boxsize))
if (i==tgtid) then
_SETCOLOR(orangered)
font3d("TGT", -4*(tgtx + boxsize*3), 4*(ybox -tgty - boxsize), hudsize*0.13)
end
-- Ž‹–ìŠO‚È‚ç–îˆó
else
_SETCOLOR(lime)
if (i==tgtid) then
-- ƒ^[ƒQƒbƒg‚Í“h‚è‚‚Ԃµ
for j=-math.pi/120, math.pi/120, px do
move3d(math.cos(tgtang)*(1.1+lenarr), ymonitor + math.sin(tgtang)*(1.1+lenarr))
line3d(math.cos(tgtang - j)*1.1, ymonitor + math.sin(tgtang - j)*1.1)
end
else
move3d(math.cos(tgtang)*(1.1+lenarr), ymonitor + math.sin(tgtang)*(1.1+lenarr))
line3d(math.cos(tgtang - math.pi/120)*1.1, ymonitor + math.sin(tgtang - math.pi/120)*1.1)
line3d(math.cos(tgtang + math.pi/120)*1.1, ymonitor + math.sin(tgtang + math.pi/120)*1.1)
line3d(math.cos(tgtang)*(1.1+lenarr), ymonitor + math.sin(tgtang)*(1.1+lenarr))
end
end
end
end

-- Œx•\Ž¦
if (math.abs(_H())<10 and gflag==-1) or (_Y()<10) then
_SETCOLOR(orangered)
font3d("PULL UP", -hudsize*0.35, -hudsize*0.7)
move3d(-hudsize*0.38, -hudsize*0.52)
line3d(-hudsize*0.38, -hudsize*0.73)
line3d(hudsize*0.38, -hudsize*0.73)
line3d(hudsize*0.38, -hudsize*0.52)
line3d(-hudsize*0.38, -hudsize*0.52)
end
if (_VZ()>_VX()+_VY()) and (2<math.abs(_H())) then
_SETCOLOR(orangered)
font3d("STALL", -hudsize*0.25, -hudsize*0.42)
move3d(-hudsize*0.38, -hudsize*0.24)
line3d(-hudsize*0.38, -hudsize*0.45)
line3d(hudsize*0.38, -hudsize*0.45)
line3d(hudsize*0.38, -hudsize*0.24)
line3d(-hudsize*0.38, -hudsize*0.24)
end
end



--------------------------------------------------
-- ƒ‚ƒWƒ…[ƒ‹
--------------------------------------------------
playerx = {} -- ƒ[ƒ‹ƒhÀ•W
playery = {}
playerz = {}

relativex = {} -- ‘Š‘΃[ƒ‹ƒhÀ•W
relativey = {}
relativez = {}

dist2d = {} -- X-Z•½–Ê‹——£
dist3d = {} -- ‹——£

loop = 250 -- ƒTƒ“ƒvƒŠƒ“ƒO‰ñ”

-- ƒvƒŒƒCƒ„[À•WŽæ“¾ŠÖ”
function getcoord()
for i=0, _PLAYERS()-1 do
if (_PLAYERID(i)~=_PLAYERMYID()) then
-- ƒmƒCƒYƒŠƒ_ƒNƒVƒ‡ƒ“
minx, maxx = _PLAYERX(i), _PLAYERX(i)
miny, maxy = _PLAYERY(i), _PLAYERY(i)
minz, maxz = _PLAYERZ(i), _PLAYERZ(i)

for j=1, loop do
minx = math.max(minx, _PLAYERX(i))
maxx = math.min(maxx, _PLAYERX(i))
miny = math.max(miny, _PLAYERY(i))
maxy = math.min(maxy, _PLAYERY(i))
minz = math.max(minz, _PLAYERZ(i))
maxz = math.min(maxz, _PLAYERZ(i))
end
playerx[i] = (minx + maxx)/2
playery[i] = (miny + maxy)/2
playerz[i] = (minz + maxz)/2

-- ‘Š‘΃[ƒ‹ƒhÀ•WŽZo
relativex[i] = playerx[i] - _X()
relativey[i] = playery[i] - _Y()
relativez[i] = playerz[i] - _Z()

-- ‹——£ŽZo
dist2d[i] = math.sqrt(relativex[i]^2+relativez[i]^2)
dist3d[i] = math.sqrt(dist2d[i]^2+relativey[i]^2)
end
end
end



-- ƒOƒ‰ƒt•`‰æŠÖ”
function linegraph(name, val, min, max, base, frames, size, x, y)
width = size
height = size/(max - min)

-- graph'name'–¼‚̃e[ƒuƒ‹ì¬
if (_G["graph"..name]==nil) then
_G["graph"..name] = {}
end

-- ’l‚Ì•Û‘¶
_G["graph"..name][1] = val
for i=frames, 2, -1 do
if (_G["graph"..name][i-1]==nil) then
_G["graph"..name][i-1] = val
end

_G["graph"..name][i] = _G["graph"..name][i-1]
end

_SETCOLOR(lime)
-- ƒOƒ‰ƒt•`‰æ
move2d(x + width/frames, y + (max-math.max(min, math.min(max, _G["graph"..name][1])))*height)
for i=1, frames do
line2d(x + width/frames*i, y + (max-math.max(min, math.min(max, _G["graph"..name][i])))*height)
end

-- ˜g
move2d(x, y)
line2d(x, y + size)
line2d(x + size, y + size)
line2d(x + size, y)
line2d(x, y)

font2d(name, x+5, y+5, size*0.1)

-- ƒx[ƒXƒ‰ƒCƒ“•\Ž¦ (ƒIƒvƒVƒ‡ƒ“)
if (base) then
_SETCOLOR(yellow)
move2d(x, y + (max - base)*height)
line2d(x + width, y + (max - base)*height)
end
end



click = {}
-- ƒ{ƒ^ƒ“
function button(name, x, y, width, height)
_SETCOLOR(lime)
-- ƒ}ƒEƒXƒI[ƒo[”»’è
if (x<=_MX()) and (_MX()<=x+width) and (y<=_MY()) and (_MY()<=y+height) then
_SETCOLOR(yellow)
-- ƒNƒŠƒbƒN”»’è
if (_ML()==1) then
_SETCOLOR(green)
click[name] = true
else
click[name] = false
end
end

-- ƒ{ƒ^ƒ“•`‰æ
move2d(x, y)
line2d(x + width, y)
line2d(x + width, y + height)
line2d(x, y + height)
line2d(x, y)

return click[name]
end



-- PID§ŒäŠÖ”
function pid(diff, i, lim, prev, kp, ki, kd)
local rp = kp*diff
local ri = i + ki*diff
local ri = math.max(-lim, math.min(lim, ri))
local rd = kd*(diff - prev)
return rp, ri, rd
end



-- ŠT”‰»ŠÖ”
function roundnum(num, range)
num = num - math.floor(num/range)*range
return num
end



-- RGB-10i”•ÏŠ·ŠÖ”
function rgb(red, lime, blue)
local rgb = red*65536 + lime*256 + blue
return rgb
end



-- ‚“x‚É‚æ‚éFŽw’è
function heightcolor(y)
if (y<-40) then
hexclr = orangered
elseif (40<y) then
hexclr = deepskyblue
else
hexclr = lime
end
return hexclr
end



-- ƒ_ƒ[ƒWƒ`ƒFƒbƒNŠÖ”
function checkdamage(name, plus)
-- connection check
if (_TOP(name)~=0) then
return _SETCOLOR(red)
elseif (plus~=nil) then
-- damage check
if (_T(name)<10000) then
return _SETCOLOR(yellow)
else
return _SETCOLOR(lime)
end
end
end



-- _MOVE2D()‚̃sƒNƒZƒ‹À•W‰»ŠÖ”
function move2d(x, y, xsgn, ysgn)
if (xsgn==nil) then
xsgn = 1
end
if (ysgn==nil) then
ysgn = 1
end

local x = (-_WIDTH()/2 + x)*px*xsgn
local y = (_HEIGHT()/2 - y)*px*ysgn
_MOVE2D(x, y)
end



-- _LINE2D()‚̃sƒNƒZƒ‹À•W‰»ŠÖ”
function line2d(x, y, xsgn, ysgn)
if (xsgn==nil) then
xsgn = 1
end
if (ysgn==nil) then
ysgn = 1
end

local x = (-_WIDTH()/2 + x)*px*xsgn
local y = (_HEIGHT()/2 - y)*px*ysgn
_LINE2D(x, y)
end



-- _MOVE3D()‚̃JƒEƒ‹À•W‰»ŠÖ”
function move3d(x, y, z, cname)
_MOVE3D(localworld(-x*0.25, -y*0.25, z, cname))
end



-- _LINE3D()‚̃JƒEƒ‹À•W‰»ŠÖ”
function line3d(x, y, z, cname)
_LINE3D(localworld(-x*0.25, -y*0.25, z, cname))
end



-- ƒ[ƒJƒ‹À•Wƒ[ƒ‹ƒh‰»ŠÖ”
function localworld(x, y, z, cname)
if (z==nil) then
z = 0
end
if (cname==nil) then
cname = MONITOR
end

local worldx = _X(cname) + _XX(cname)*x + _YX(cname)*z + _ZX(cname)*y
local worldy = _Y(cname) + _XY(cname)*x + _YY(cname)*z + _ZY(cname)*y
local worldz = _Z(cname) + _XZ(cname)*x + _YZ(cname)*z + _ZZ(cname)*y
return worldx, worldy, worldz
end



-- ƒ[ƒ‹ƒhÀ•Wƒ[ƒJƒ‹‰»ŠÖ”
function worldlocal(x, y, z, cname)
if (cname==nil) then
cname = 0
end

local localx = _XX(cname)*x + _XY(cname)*y + _XZ(cname)*z
local localy = _YX(cname)*x + _YY(cname)*y + _YZ(cname)*z
local localz = _ZX(cname)*x + _ZY(cname)*y + _ZZ(cname)*z
return localx, localy, localz
end



-- X-Z•½–ʉñ“]ŠÖ” (‰ñ“]s—ñ)
function rotator2d(srcx, srcz)
local rotx = srcx*math.cos(_EY()) - srcz*math.sin(_EY())
local rotz = srcx*math.sin(_EY()) + srcz*math.cos(_EY())
return rotx, rotz
end



-- ƒsƒbƒ`ŠpŽZo—pŠÖ”
function EX()
if(-math.pi<=_EY() and _EY()<=-math.pi/2) or (math.pi/2<=_EY() and _EY()<=math.pi) then
local ex = -_EX()
return ex
else
local ex = _EX()
return ex
end
end



-- out()ŠÖ”‚̍sƒx[ƒXƒ‰ƒCƒ“ŽZoŠÖ” (’PˆÊ:ƒsƒNƒZƒ‹)
function lineout(l)
local line = (l + 1)*15
return line
end



-- PHP‚Ìexplode()ŠÖ” (•s—v‚Æ‚È‚è‚Ü‚µ‚½)
function explode(sep, str)
if (sep=="") then
return false
end

local estr = {}
local i = 1
local find = string.find(str, sep)

while (find) do
estr[i] = string.sub(str, 1, find-1)
str = string.gsub(str, estr[i]..sep, "", 1)
i = i + 1
find = string.find(str, sep)
end
estr[i] = str

return estr
end



-- ƒtƒHƒ“ƒg•`‰æŠÖ” (2D)
function font2d(str, x, y, fsize, fspace)
if (fsize==nil) then
fsize = 10
end
if (fspace==nil) then
fspace = 1
end

-- ƒtƒHƒ“ƒgƒpƒXŽæ“¾
fontpath = loadpath(str, x, y, fsize, fspace)

-- ƒpƒX‚ðƒgƒŒ[ƒX
for i, j in ipairs(fontpath) do
move2d(x + j[1][1], y - j[1][2] + fsize)
for k, l in ipairs(fontpath[i]) do
if (l[1]=="M") then
move2d(x + l[2], y - l[3] + fsize)
else
line2d(x + l[1], y - l[2] + fsize)
end
end
end
end



-- ƒtƒHƒ“ƒg•`‰æŠÖ” (ƒJƒEƒ‹ƒ‚ƒjƒ^)
function font3d(str, x, y, fsize, fspace)
if (fsize==nil) then
fsize = 0.08
end
if (fspace==nil) then
fspace = 0.7
end

-- ƒtƒHƒ“ƒgƒpƒXŽæ“¾
fontpath = loadpath(str, x, y, fsize, fspace)

-- ƒpƒX‚ðƒgƒŒ[ƒX
for i, j in ipairs(fontpath) do
move3d(x + j[1][1], y + j[1][2])
for k, l in ipairs(fontpath[i]) do
if (l[1]=="M") then
move3d(x + l[2], y + l[3])
else
line3d(x + l[1], y + l[2])
end
end
end
end



-- ƒtƒHƒ“ƒgƒpƒX“ǂݍž‚Ý
function loadpath(str, x, y, fsize, fspace)
local fpath = {}

-- Še•¶Žš‚𕪊„
for i=1, string.len(str) do
font = simplefont[string.sub(str,i,i)]
if (font==nil) then
font = simplefont["-"]
end

-- ƒpƒX‚ð“ǂݍž‚݃e[ƒuƒ‹‚É•Û‘¶
fpath[i] = {}
fpath[i][1] = {(font[1][1] + (i-1)*fspace)*fsize, font[1][2]*fsize}
for j, k in ipairs(font) do
if (k[1]=="M") then
fpath[i][j] = {"M", (k[2] + (i-1)*fspace)*fsize, k[3]*fsize}
else
fpath[i][j] = {(k[1] + (i-1)*fspace)*fsize, k[2]*fsize}
end
end
end
return fpath
end



-- ƒtƒHƒ“ƒgƒpƒXƒf[ƒ^
simplefont = {
-- [name] = { {["M",] x, y}, ... }, ©️’ljÁE•ÏX‚³‚ê‚éê‡‚̓Rƒ“ƒ}–Y‚ê‚É’ˆÓ
["0"] = { {0,0},{0,1},{0.5,1},{0.5,0},{0,0},{0.5,1} },
["1"] = { {0.2,1},{0.4,1},{0.4,0} },
["2"] = { {0,1},{0.5,1},{0.5,0.5},{0,0.5},{0,0},{0.5,0} },
["3"] = { {0,1},{0.5,1},{0.5,0},{0,0},{"M",0,0.5},{0.5,0.5} },
["4"] = { {0,1},{0,0.5},{0.5,0.5},{"M",0.3,1},{0.3,0} },
["5"] = { {0.5,1},{0,1},{0,0.5},{0.5,0.5},{0.5,0},{0,0},{0,0.25}},
["6"] = { {0.5,1},{0,1},{0,0.5},{0.5,0.5},{0.5,0},{0,0},{0,0.5}},
["7"] = { {0,0.6},{0,1},{0.5,1},{0.5,0} },
["8"] = { {0,0},{0,1},{0.5,1},{0.5,0},{0,0},{"M",0,0.5},{0.5,0.5} },
["9"] = { {0.5,0.5},{0,0.5},{0,1},{0.5,1},{0.5,0},{0,0} },

["A"] = { {0,0},{0.25,1},{0.5,0},{"M",0.1,0.35},{0.4,0.35} },
["B"] = { {0.35,0.5},{0.35,1},{0,1},{0,0},{0.5,0},{0.5,0.5},{0,0.5} },
["C"] = { {0.5,1},{0,1},{0,0},{0.5,0} },
["D"] = { {0,1},{0,0},{0.25,0},{0.5,0.25},{0.5,0.75},{0.25,1},{0,1} },
["E"] = { {0.5,1},{0,1},{0,0},{0.5,0},{"M",0,0.5},{0.4,0.5} },
["F"] = { {0.5,1},{0,1},{0,0},{"M",0,0.5},{0.4,0.5} },
["G"] = { {0.5,1},{0,1},{0,0},{0.5,0},{0.5,0.5},{0.2,0.5} },
["H"] = { {0,1},{0,0},{"M",0,0.5},{0.5,0.5},{"M",0.5,1},{0.5,0} },
["I"] = { {0.25,1},{0.25,0},{"M",0.1,1},{0.4,1},{"M",0.1,0},{0.4,0} },
["J"] = { {0.5,1},{0.5,0},{0,0},{0,0.25} },
["K"] = { {0,1},{0,0},{"M",0.45,1},{0,0.3},{"M",0.2,0.5},{0.5,0} },
["L"] = { {0,1},{0,0},{0.5,0} },
["M"] = { {0,0},{0,1},{0.25,0.25},{0.5,1},{0.5,0} },
["N"] = { {0,0},{0,1},{0.5,0},{0.5,1} },
["O"] = { {0,0},{0,1},{0.5,1},{0.5,0},{0,0} },
["P"] = { {0,0.5},{0.5,0.5},{0.5,1},{0,1},{0,0} },
["Q"] = { {0,0},{0,1},{0.5,1},{0.5,0},{0,0},{"M",0,0.25},{0.3,0.25},{0.3,0} },
["R"] = { {0,0},{0,1},{0.5,1},{0.5,0.5},{0,0.5},{"M",0.2,0.5},{0.5,0} },
["S"] = { {0.5,1},{0,1},{0,0.5},{0.5,0.5},{0.5,0},{0,0}},
["T"] = { {0.25,1},{0.25,0},{"M",0,1},{0.5,1} },
["U"] = { {0,1},{0,0},{0.5,0},{0.5,1} },
["V"] = { {0,1},{0.25,0},{0.5,1} },
["W"] = { {0,1},{0.1,0},{0.25,0.9},{0.4,0},{0.5,1} },
["X"] = { {0,1},{0.5,0},{"M",0,0},{0.5,1} },
["Y"] = { {0,1},{0.25,0.5},{0.25,0},{"M",0.5,1},{0.25,0.5} },
["Z"] = { {0,1},{0.5,1},{0,0},{0.5,0} },

["a"] = { {0,0.5},{0.5,0.5},{0.5,0},{0,0},{0,0.25},{0.5,0.25} },
["b"] = { {0,1},{0,0},{0.5,0},{0.5,0.5},{0,0.5} },
["c"] = { {0.5,0.5},{0,0.5},{0,0},{0.5,0} },
["d"] = { {0.5,0.5},{0,0.5},{0,0},{0.5,0},{0.5,1} },
["e"] = { {0,0.25},{0.5,0.25},{0.5,0.5},{0,0.5},{0,0},{0.5,0} },
["f"] = { {0.5,1},{0.22,1},{0.22,0},{"M",0,0.5},{0.5,0.5} },
["g"] = { {0.5,0},{0,0},{0,0.5},{0.5,0.5},{0.5,-0.25},{0,-0.25} },
["h"] = { {0,1},{0,0},{"M",0,0.5},{0.5,0.5},{0.5,0} },
["i"] = { {0.25,0.8},{0.25,0.7},{"M",0.25,0.5},{0.25,0} },
["j"] = { {0.25,0.8},{0.25,0.7},{"M",0.25,0.5},{0.25,-0.25},{0,-0.25} },
["k"] = { {0,1},{0,0},{"M",0.5,0.5},{0,0.3},{"M",0.2,0.35},{0.5,0} },
["l"] = { {0.25,1},{0.25,0} },
["m"] = { {0,0},{0,0.5},{0.5,0.5},{0.5,0},{"M",0.25,0.5},{0.25,0} },
["n"] = { {0,0},{0,0.5},{0.5,0.5},{0.5,0} },
["o"] = { {0.5,0.5},{0,0.5},{0,0},{0.5,0},{0.5,0.5} },
["p"] = { {0,0},{0.5,0},{0.5,0.5},{0,0.5},{0,-0.25} },
["q"] = { {0.5,0},{0,0},{0,0.5},{0.5,0.5},{0.5,-0.25} },
["r"] = { {0,0},{0,0.5},{0.5,0.5} },
["s"] = { {0.5,0.5},{0,0.5},{0,0.25},{0.5,0.25},{0.5,0},{0,0} },
["t"] = { {0.25,0.75},{0.25,0},{"M",0,0.5},{0.5,0.5} },
["u"] = { {0,0.5},{0,0},{0.5,0},{0.5,0.5} },
["v"] = { {0,0.5},{0.25,0},{0.5,0.5} },
["w"] = { {0,0.5},{0.1,0},{0.25,0.45},{0.4,0},{0.5,0.5} },
["x"] = { {0,0.5},{0.5,0},{"M",0,0},{0.5,0.5} },
["y"] = { {0,0.5},{0.25,0.12},{"M",0.5,0.5},{0,-0.25} },
["z"] = { {0,0.5},{0.5,0.5},{0,0},{0.5,0} },

[" "] = { {0,0} },
["."] = { {0,0},{0.1,0} },
[","] = { {0,0},{0,-0.25} },
[":"] = { {0.25,0.8},{0.25,0.6},{"M",0.25,0.3},{0.25,0.1} },
[";"] = { {0.25,0.8},{0.25,0.6},{"M",0.25,0.3},{0.2,0.1} },
["!"] = { {0.25,1},{0.25,0.25},{"M",0.25,0.1},{0.25,0} },
["?"] = { {0,0.75},{0,1},{0.5,1},{0.5,0.5},{0.25,0.5},{0.25,0.25},{"M",0.25,0.1},{0.25,0} },
["/"] = { {0,0},{0.5,1} },
["*"] = { {0,0.6},{0.5,0.3},{"M",0.5,0.6},{0,0.3},{"M",0.25,0.7},{0.25,0.1} },
["+"] = { {0,0.4},{0.5,0.4},{"M",0.25,0.7},{0.25,0.1} },
["-"] = { {0,0.4},{0.5,0.4} },
["="] = { {0,0.6},{0.5,0.6},{"M",0,0.3},{0.5,0.3} },
["_"] = { {0,0},{0.5,0} },
["`"] = { {0,1},{0.1,0.6} },
["'"] = { {0.1,1},{0,0.6} },
["\""] = { {0.1,1},{0,0.6},{"M",0.3,1},{0.2,0.6} },
["^"] = { {0.1,0.75},{0.25,1},{0.4,0.75} },
["~"] = { {0,0.75},{0.15,1},{0.35,0.75},{0.5,1} },
["("] = { {0.5,1},{0.3,0.8},{0.2,0.5},{0.3,0.2},{0.5,0} },
[")"] = { {0,1},{0.2,0.8},{0.3,0.5},{0.2,0.2},{0,0} },
["["] = { {0.5,1},{0.35,1},{0.35,0},{0.5,0} },
["]"] = { {0,1},{0.25,1},{0.25,0},{0,0} },
["{"] = { {0.5,1},{0.3,0.9},{0.3,0.6},{0.1,0.5},{0.3,0.4},{0.3,0.1},{0.5,0} },
["}"] = { {0,1},{0.2,0.9},{0.2,0.6},{0.4,0.5},{0.2,0.4},{0.2,0.1},{0,0} },
["<"] = { {0.5,1},{0,0.5},{0.5,0} },
[">"] = { {0,1},{0.5,0.5},{0,0} },
["|"] = { {0.25,1},{0.25,-0.25} },
["#"] = { {0.2,1},{0.05,0},{"M",0.45,1},{0.3,0},{"M",0,0.75},{0.5,0.75},{"M",0,0.25},{0.5,0.25} },
["$"] = { {0.5,0.8},{0,0.8},{0,0.5},{0.5,0.5},{0.5,0.2},{0,0.2},{"M",0.25,1},{0.25,0} },
["%"] = { {0,0},{0.5,1},{"M",0,1},{0,0.75},{0.2,0.75},{0.2,1},{0,1},{"M",0.3,0.25},{0.3,0},{0.5,0},{0.5,0.25},{0.3,0.25} },
["@"] = { {0.1,0.8},{0.4,0.8},{0.4,0.2},{0.1,0.2},{0.1,0.6},{0.4,0.6},{"M",0,1},{0,0},{0.5,0},{0.5,1},{0,1} },
["\\"] = { {0,1},{0.25,0.6},{0.25,0},{"M",0.5,1},{0.25,0.6},{"M",0,0.5},{0.5,0.5},{"M",0,0.3},{0.5,0.3} },
["\n"] = { {0.5,0.8},{0.5,0.2},{0,0.2},{0.2,0.5},{"M",0,0.2},{0.2,0} },
}

}
mober
mober
Tank
Tank

Posts : 65
Join date : 2012-01-17

Back to top Go down

radar Empty Re: radar

Post by mober Thu Sep 20, 2012 6:37 am

how do you tern of the faces?
mober
mober
Tank
Tank

Posts : 65
Join date : 2012-01-17

Back to top Go down

radar Empty Re: radar

Post by Maurice Thu Sep 20, 2012 12:04 pm

There's a button for it above the typing box. It looks like a sheet of paper with <> on it. Press it once to open a code box, paste your code, then press it again to close the code box.
Maurice
Maurice
Hover
Hover

Posts : 153
Join date : 2011-10-07
Age : 29
Location : The early 1970's

Back to top Go down

radar Empty Re: radar

Post by RA2lover Sat Sep 22, 2012 1:25 pm

that script does a lot more than just a radar, and will fail if you use it somewhere else.
RA2lover
RA2lover
Walker
Walker

Posts : 382
Join date : 2010-10-11
Age : 29
Location : Brazil

Back to top Go down

radar Empty Re: radar

Post by mober Mon Sep 24, 2012 7:50 am

can you fix it
mober
mober
Tank
Tank

Posts : 65
Join date : 2012-01-17

Back to top Go down

radar Empty Re: radar

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum