Lua [ARZ] ARP logo

cherepash

Новичок
Автор темы
11
24
Версия SA-MP
  1. 0.3.7 (R1)
  2. 0.3.7-R2
  3. 0.3.7-R3
  4. 0.3.7-R4
  5. 0.3.7-R5
Предыстория: выложил я к себе в паблик и начали писать зачем я закрываю код и ворую благодаря этому аккаунты. Поэтому решил слить код. Сам код не идеален, есть ошибки и недочеты, но я старался.
sa-mp-123.png

Описание: меняет логотип Аризоны на новый логотип Адванса

Активация: автоматическая

code:
script_name('ARP Visual Logo for Arizona Role Play by cherepash')
script_author('cherepash')
script_version('1.1')

local ipName = {
    ["185.169.134.3"] = {"PHOENIX", 0xFFB40000, 589.000098, 12.673996, 2},
    ["185.169.134.4"] = {"TUCSON", 0xFFB40000, 589.000098, 12.673996, 2},
    ["185.169.134.43"] = {"SCOTTDALE", 0xFF15871B, 589.000098, 12.673996, 2},
    ["185.169.134.44"] = {"CHANDLER", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["185.169.134.45"] = {"BRAINBURG", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["185.169.134.5"] = {" SAINT ROSE", 0xFFFF00AA, 589.000098, 12.673996, 2},
    ["185.169.134.59"] = {"MESA", 0xFFB40000, 589.000098, 12.673996, 2},
    ["185.169.134.61"] = {"RED ROCK", 0xFFB40000, 589.000098, 12.673996, 2},
    ["185.169.134.107"] = {"YUMA", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["185.169.134.109"] = {"SURPRISE", 0xFF15871B, 589.000098, 12.673996, 2},
    ["185.169.134.166"] = {"PRESCOTT", 0xFFFF00AA, 589.000098, 12.673996, 2},
    ["185.169.134.171"] = {"GLENDALE", 0xFFFF00AA, 589.000098, 12.673996, 2},
    ["185.169.134.172"] = {"KINGMAN", 0xFF15871B, 589.000098, 12.673996, 2},
    ["185.169.134.173"] = {"WINSLOW", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["185.169.134.174"] = {"PAYSON", 0xFFFF00AA, 589.000098, 12.673996, 2},
    ["80.66.82.191"] = {"GILBERT", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.190"] = {"SHOW LOW", 0xFF15871B, 589.000098, 12.673996, 2},
    ["80.66.82.188"] = {"CASA GRANDE", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.168"] = {"PAGE", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.159"] = {"SUN CITY", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.200"] = {"QUEEN CREEK", 0xFF15871B, 568.000098, 12.673996, 1},
    ["80.66.82.144"] = {"SEDONA", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.132"] = {"HOLIDAY", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.128"] = {"WEDNESDAY", 0xFFB40000, 589.000098, 12.673996, 2},
    ["80.66.82.113"] = {"YAVA", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.82"] = {"FARAWAY", 0xFFB40000, 589.000098, 12.673996, 2},
    ["80.66.82.87"] = {"BUMBLE BEE", 0xFFFF00AA, 589.000098, 12.673996, 2},
    ["80.66.82.54"] = {"CHRISTMAS", 0xFFB40000, 589.000098, 12.673996, 2},
    ["80.66.82.39"] = {"MIRAGE", 0xFF9900AA, 589.000098, 12.673996, 2},
    ["80.66.82.33"] = {"LOVE", 0xFFB40000, 589.000098, 12.673996, 2}
}
local cBoxColor = {0xFFFFFFFF, 0x80808080}

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then
        return
    end
    while not isSampAvailable() do wait(50) end
    while true do wait(0)
    local ip, port = sampGetCurrentServerAddress()
    if ipName[ip] ~= nil then
        if sampTextdrawIsExists(306) and sampTextdrawIsExists(307) and sampTextdrawIsExists(308) then
        local NameServer = ipName[ip]
        local color = cColor
        local cBox = cBoxColor

        sampTextdrawDelete(306)
        sampTextdrawDelete(307)
        sampTextdrawDelete(308)
        sampTextdrawDelete(309)
        sampTextdrawDelete(310)
        sampTextdrawDelete(311)
        sampTextdrawDelete(312)
        sampTextdrawDelete(313)
        sampTextdrawDelete(314)
        sampTextdrawDelete(315)
        sampTextdrawDelete(316)
        sampTextdrawDelete(317)
        sampTextdrawDelete(318)
        sampTextdrawDelete(319)
        sampTextdrawDelete(320)
        sampTextdrawDelete(321)
        
        --512 (3)
        if not sampTextdrawIsExists(512) then
        sampTextdrawCreate(512, NameServer[1], NameServer[3], NameServer[4])
        sampTextdrawSetLetterSizeAndColor(512, 0.245600, 1.105298, NameServer[2])
        sampTextdrawSetBoxColorAndSize(512, 0, 0, 1280.000000, 1280.000000)
        sampTextdrawSetAlign(512, NameServer[5])
        end
        --513 (4
        if not sampTextdrawIsExists(513) then
        sampTextdrawCreate(513, "ARIZONA", 568.599475, 3.085200)
        sampTextdrawSetLetterSizeAndColor(513, 0.263000, 1.359200, cBox[1])
        sampTextdrawSetBoxColorAndSize(513, 0, 0, 1280.000000, 1280.000000)
        sampTextdrawSetAlign(513, 1)
        end
        --514 (13)
        if not sampTextdrawIsExists(514) then
        sampTextdrawCreate(514, "A", 555.565796, 5.192500)
        sampTextdrawSetLetterSizeAndColor(514, 0.306800, 1.442100, cBox[1])
        sampTextdrawSetBoxColorAndSize(514, 0, 0, 1280.000000, 1280.000000)
        sampTextdrawSetProportional(514, 1)
        sampTextdrawSetAlign(514, 2)
        sampTextdrawSetStyle(514, 1)
        end
        --515 (12)
        if not sampTextdrawIsExists(515) then
        sampTextdrawCreate(515, '_', 545.33312988281, 0.273900)
        sampTextdrawSetLetterSizeAndColor(515, 0.000000, 0.000000, cBox[1])
        sampTextdrawSetOutlineColor(515, 0, 0)
        sampTextdrawSetBoxColorAndSize(515, 0, 0, 20.000000, 24.000000)
        sampTextdrawSetModelRotationZoomVehColor(515, 1316, 90, 0, 0, 1, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(515, 1)
        sampTextdrawSetProportional(515, 0)
        sampTextdrawSetStyle(515, 5)
        end
        --516 (11)
        if not sampTextdrawIsExists(516) then
        sampTextdrawCreate(516, "-", 557.932312, 10.659296)
        sampTextdrawSetLetterSizeAndColor(516, 0.335000, 1.010900, cBox[1])
        sampTextdrawSetBoxColorAndSize(516, 0, 0, 1280.000000, 1280.000000)
        sampTextdrawSetAlign(516, 2)
        sampTextdrawSetOutlineColor(516, 0, cBox[1])
        sampTextdrawSetProportional(516, 1)
        sampTextdrawSetStyle(516, 1)
        end
        --517 (10)
        if not sampTextdrawIsExists(517) then
        sampTextdrawCreate(517, "-", 553.631958, 10.659296)
        sampTextdrawSetLetterSizeAndColor(517, 0.335000, 1.010900, cBox[1])
        sampTextdrawSetBoxColorAndSize(517, 0, 0, 1280.000000, 1280.000000)
        sampTextdrawSetAlign(517, 2)
        sampTextdrawSetOutlineColor(517, 0, cBox[1])
        sampTextdrawSetProportional(517, 1)
        sampTextdrawSetStyle(517, 1)
        end
        --518 (9)
        if not sampTextdrawIsExists(518) then
        sampTextdrawCreate(518, '_', 567.633728, 13.489000)
        sampTextdrawSetLetterSizeAndColor(518, 0.000000, 0.000000, NameServer[2])
        sampTextdrawSetOutlineColor(518, 0, 0)
        sampTextdrawSetBoxColorAndSize(518, 0, NameServer[2], -25.000000, 9.000000)
        sampTextdrawSetModelRotationZoomVehColor(518, 1316, 227.000000, 124.000000, 0.000000, 0.427500, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(518, 1)
        sampTextdrawSetProportional(518, 0)
        sampTextdrawSetStyle(518, 5)
        end
        --519 (8)
        if not sampTextdrawIsExists(519) then
        sampTextdrawCreate(519, '_', 555.766724, 17.970301)
        sampTextdrawSetLetterSizeAndColor(519, 8.000000, 10.000000, NameServer[2])
        sampTextdrawSetOutlineColor(519, 0, 0)
        sampTextdrawSetBoxColorAndSize(519, 0, 0, 8.000000, 10.000000)
        sampTextdrawSetModelRotationZoomVehColor(519, 19177, 0.000000, 209.000000, 0.000000, 0.187600, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(519, 1)
        sampTextdrawSetProportional(519, 0)
        sampTextdrawSetStyle(519, 5)
        end
        --520 (7)
        if not sampTextdrawIsExists(520) then
        sampTextdrawCreate(520, '_', 562.233215, 8.444196)
        sampTextdrawSetLetterSizeAndColor(520, 0.000000, 0.000000, NameServer[2])
        sampTextdrawSetOutlineColor(520, 0, 0)
        sampTextdrawSetBoxColorAndSize(520, 0, 0, 4.110000, 3.319900)
        sampTextdrawSetModelRotationZoomVehColor(520, 19201, 110.000000, 221.000000, 115.000000, 0.192900, cBox[1], cBox[1])
        sampTextdrawSetAlign(520, 1)
        sampTextdrawSetProportional(520, 0)
        sampTextdrawSetStyle(520, 5)
        end
        --521 (6)
        if not sampTextdrawIsExists(521) then
        sampTextdrawCreate(521, "_", 562.133179, 12.166296)
        sampTextdrawSetLetterSizeAndColor(521, 0.000000, 0.000000, NameServer[2])
        sampTextdrawSetOutlineColor(521, 0, 0)
        sampTextdrawSetBoxColorAndSize(521, 0, 0, 4.000000, 7.000000)
        sampTextdrawSetModelRotationZoomVehColor(521, 19201, 52.000000, 360.000000, 93.000000, 0.187600, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(521, 1)
        sampTextdrawSetProportional(521, 0)
        sampTextdrawSetStyle(521, 5)
        end
        --522 (5)
        if not sampTextdrawIsExists(522) then
        sampTextdrawCreate(522, '_', 560.333130, 17.584900)
        sampTextdrawSetLetterSizeAndColor(522, 0.000000, 0.000000, NameServer[2])
        sampTextdrawSetOutlineColor(522, 0, 0)
        sampTextdrawSetBoxColorAndSize(522, 0, 0, 4.000000, 4.000000)
        sampTextdrawSetModelRotationZoomVehColor(522, 19201, 302.000000, 134.000000, 0.000000, 0.192900, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(522, 1)
        sampTextdrawSetProportional(522, 0)
        sampTextdrawSetStyle(522, 5)
        end
        --523 (2)
        if not sampTextdrawIsExists(523) then
        sampTextdrawCreate(523, '_', 549.333130, 25.703800)
        sampTextdrawSetLetterSizeAndColor(523, 0.000000, 0.000000, NameServer[2])
        sampTextdrawSetOutlineColor(523, 0, 0)
        sampTextdrawSetBoxColorAndSize(523, 0, 0, 12.000000, -23.000000)
        sampTextdrawSetModelRotationZoomVehColor(523, 1316, 136.000000, 0.000000, 0.000000, 0.500500, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(523, 1)
        sampTextdrawSetProportional(523, 0)
        sampTextdrawSetStyle(523, 5)
        end
        --524 (1)
        if not sampTextdrawIsExists(524) then
        sampTextdrawCreate(524, '_', 549.466370, 21.740900)
        sampTextdrawSetLetterSizeAndColor(524, 0.000000, 0.000000, NameServer[2])
        sampTextdrawSetOutlineColor(524, 0, 0)
        sampTextdrawSetBoxColorAndSize(524, 0, 0, 15.100000, -13.000000)
        sampTextdrawSetModelRotationZoomVehColor(524, 1316, 290.000000, 318.000000, 0.000000, 0.474400, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(524, 1)
        sampTextdrawSetProportional(524, 0)
        sampTextdrawSetStyle(524, 5)
        end
        --525 (1)
        if not sampTextdrawIsExists(525) then
        sampTextdrawCreate(525, '_', 566.133728, 13.489000)
        sampTextdrawSetLetterSizeAndColor(525, 0.000000, 0.000000, NameServer[2])
        sampTextdrawSetOutlineColor(525, 0, 0)
        sampTextdrawSetBoxColorAndSize(525, 0, NameServer[2], -25.000000, 9.000000)
        sampTextdrawSetModelRotationZoomVehColor(525, 1316, 227.000000, 124.000000, 0.000000, 0.427500, NameServer[2], NameServer[2])
        sampTextdrawSetAlign(525, 1)
        sampTextdrawSetProportional(525, 0)
        sampTextdrawSetStyle(525, 5)
        end
      end
    end
end
end

Требования: Moonloader

Автор: cherepash

Если использовать на Аризоне, есть баги с кликабельность. Текстдравы приобретают магические свойства

code fix:
        if sampTextdrawIsExists(2161) or sampTextdrawIsExists(305) then
        wait(0)
        sampTextdrawDelete(512)
        sampTextdrawDelete(513)
        sampTextdrawDelete(514)
        sampTextdrawDelete(515)
        sampTextdrawDelete(516)
        sampTextdrawDelete(517)
        sampTextdrawDelete(518)
        sampTextdrawDelete(519)
        sampTextdrawDelete(520)
        sampTextdrawDelete(521)
        sampTextdrawDelete(522)
        sampTextdrawDelete(523)
        sampTextdrawDelete(524)
        sampTextdrawDelete(525)
        wait(50)
      end
     end
 
Последнее редактирование: