Код:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Include overlay/include/ahk/overlay.ahk
#Include ../inc/samp.ahk
/*
1 - получение и мониторинг координт всех персонажей в зоне стрима
2 - WorldToScreen
3 - dx9overlay(рисование)
*/
SetParam("use_window", "1")
SetParam("window", "GTA:SA:MP")
Loop{
Sleep, 15
p := getStreamedInPlayersInfo()
if (!p)
return
ii := 0
For i, o in p ; берет игроков координаты игроков, переменная o.Pos
{
WTS := calcScreenCoors(o.Pos[1], o.Pos[2], o.Pos[3])
if( WTS[1] > -3000.0 && WTS[1] < 3000.0 && (WTS[1] + 0x1) > -3000.0 && (WTS[1] + 0x1) < 3000.0 && (WTS[1] + 0x2) > -3000.0 && (WTS[1] + 0x2) < 3000.0 && WTS[1] != 0 && floor((WTS[1] + 0x1)) != 0 && floor((WTS[1] + 0x2)) != 0 )
{
box%ii% := BoxCreate(WTS[1]-300, WTS[2]-80, 10, 20,0xFFFFFFFF, true)
ii++
}
else
{
box%ii% := BoxCreate(WTS[1]-5, WTS[2]+5, 10, 20,0xFFFFFFFF, true)
ii++
}
}
num := ii
i := 0
Loop, %num%
{
Sleep, 5
BoxDestroy(box%i%)
i++
}
if(getkeystate("numpad1","P"))
ExitApp
}