-
Posts
38 -
Joined
-
Last visited
Everything posted by TaHkep
-
1. скрипт полностью мой 2. да 3.а вот это я не понял как вставлять
-
не, не пашет....
-
не, не работает код: local screenWidth,screenHeight = guiGetScreenSize() function drawHealth ( ) health = getElementHealth ( getLocalPlayer() ) if ( health >= 98 and health =< 100 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h100.png' ) end if ( health >= 93 and health < 98 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h95.png' ) end if ( health >= 88 and health < 93 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h90.png' ) end if ( health >= 83 and health < 88 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h85.png' ) end if ( health >= 78 and health < 83 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h80.png' ) end if ( health >= 73 and health < 78 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h75.png' ) end if ( health >= 68 and health < 73 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h70.png' ) end if ( health >= 63 and health < 68 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h65.png' ) end if ( health >= 58 and health < 63 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h60.png' ) end if ( health >= 53 and health < 58 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h55.png' ) end if ( health >= 48 and health < 53 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h50.png' ) end if ( health >= 43 and health < 48 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h45.png' ) end if ( health >= 38 and health < 43 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h40.png' ) end if ( health >= 33 and health < 38 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h35.png' ) end if ( health >= 28 and health < 33 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h30.png' ) end if ( health >= 23 and health < 28 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h25.png' ) end if ( health >= 18 and health < 23 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h20.png' ) end if ( health >= 13 and health < 18 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h15.png' ) end if ( health >= 8 and health < 13 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h10.png' ) end if ( health >= 3 and health < 8 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h5.png' ) end if ( health >= 0 and health < 3 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h0.png' ) end end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), drawHealth) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
-
всем ку, у меня проблема. нашел классный худ (автор shama123) и решил перенести его в мта. начал с хп. одним словом рабочий скрипт: local screenWidth,screenHeight = guiGetScreenSize() function drawHealth ( ) health = getElementHealth ( getLocalPlayer() ) if ( health >= 93 and health < 98 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h95.png' ) end end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), drawHealth) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) нерабочий скрипт: local screenWidth,screenHeight = guiGetScreenSize() function drawHealth ( ) health = getElementHealth ( getLocalPlayer() ) if ( health >= 98 and health =< 100 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h100.png' ) end elseif ( health >= 93 and health < 98 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h95.png' ) end elseif ( health >= 88 and health < 93 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h90.png' ) end elseif ( health >= 83 and health < 88 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h85.png' ) end elseif ( health >= 78 and health < 83 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h80.png' ) end elseif ( health >= 73 and health < 78 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h75.png' ) end elseif ( health >= 68 and health < 73 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h70.png' ) end elseif ( health >= 63 and health < 68 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h65.png' ) end elseif ( health >= 58 and health < 63 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h60.png' ) end elseif ( health >= 53 and health < 58 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h55.png' ) end elseif ( health >= 48 and health < 53 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h50.png' ) end elseif ( health >= 43 and health < 48 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h45.png' ) end elseif ( health >= 38 and health < 43 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h40.png' ) end elseif ( health >= 33 and health < 38 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h35.png' ) end elseif ( health >= 28 and health < 33 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h30.png' ) end elseif ( health >= 23 and health < 28 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h25.png' ) end elseif ( health >= 18 and health < 23 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h20.png' ) end elseif ( health >= 13 and health < 18 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h15.png' ) end elseif ( health >= 8 and health < 13 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h10.png' ) end elseif ( health >= 3 and health < 8 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h5.png' ) end elseif ( health >= 0 and health < 3 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h0.png' ) end end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), drawHealth) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) пробовал вместо elseif писать if, но не помогло.... помогите пожалуйста
-
нет, реально понял: нужно было указать, что модель скина нужно узнать у игрока который стоит на маркере, а я написал что просто у игрока
-
работает понял в чем ошибка, спасибо
-
тогда объясните где ошибка, потому что вики не помогла
-
введение прочитал, как-то не помогло
-
не понял. вот стоит переменная if uss1[ getElementModel ( thePlayer ) ] then где её нет?
-
function Teleporthit ( hitPlayer, matchingDimension, thePlayer ) так?
-
еще пробовал onClientResourceStart, тоже маркеры не создаются
-
хочу сделать телепорт, который телепортирует игроков с определенными скинами. все сделал, но в консоле выдает ошибку base_us\teleport.lua:67 Bad argumen @ 'getElmentModel' когда становлюсь на маркер (ну и конечно не телепортирует) запускал на клиентской части-даже маркеры не создаются пробовал без проверки на скин-все работает сам скрипт: function Makemarker () local theMarker1a = createMarker ( 1213.4, -1670.1, 26.3, "cylinder", 1.5, 255, 0, 0, 70 ) setElementData ( theMarker1a, "teleportid", 1 ) local theMarker1b = createMarker ( 1217, -1692.6, 18.7, "cylinder", 1.5, 255, 0, 0, 70 ) setElementData ( theMarker1b, "teleportid", 2 ) local theMarker2a = createMarker ( 1233.2, -1632.5, 26.3, "cylinder", 1.5, 0, 255, 0, 70 ) setElementData ( theMarker2a, "teleportid", 3 ) local theMarker2b = createMarker ( 1234.1, -1616.6, 12.5, "cylinder", 1.5, 0, 255, 0, 70 ) setElementData ( theMarker2b, "teleportid", 4 ) local theMarker3a = createMarker ( 1282.4, -1689, 33.8, "cylinder", 1.5, 0, 0, 255, 70 ) setElementData ( theMarker3a, "teleportid", 5 ) local theMarker3b = createMarker ( 1281.1, -1641.7, 26.3, "cylinder", 1.5, 0, 0, 255, 70 ) setElementData ( theMarker3b, "teleportid", 6 ) end addEventHandler ( "onResourceStart", getRootElement(), Makemarker ) function Teleporthit ( hitPlayer, matchingDimension ) local teleportid = getElementData ( source, "teleportid" ) if teleportid == 1 then local uss1 = { [67] = true, [29] = true, [105] = true, [106] = true, [107] = true, [111] = true, [311] = true, [112] = true, [113] = true } if uss1[ getElementModel ( thePlayer ) ] then setElementPosition ( hitPlayer, 1219, -1692.6, 19.7 ) end end local teleportid = getElementData ( source, "teleportid" ) if teleportid == 2 then local uss2 = { [67] = true, [29] = true, [105] = true, [106] = true, [107] = true, [111] = true, [311] = true, [112] = true, [113] = true } if uss2[ getElementModel ( thePlayer ) ] then setElementPosition ( hitPlayer, 1213.4, -1668.1, 27.3 ) end end local teleportid = getElementData ( source, "teleportid" ) if teleportid == 3 then local uss3 = { [67] = true, [29] = true, [105] = true, [106] = true, [107] = true, [111] = true, [311] = true, [112] = true, [113] = true } if uss3[ getElementModel ( thePlayer ) ] then setElementPosition ( hitPlayer, 1234.1, -1614.6, 13.5 ) end end local teleportid = getElementData ( source, "teleportid" ) if teleportid == 4 then local uss4 = { [67] = true, [29] = true, [105] = true, [106] = true, [107] = true, [111] = true, [311] = true, [112] = true, [113] = true } if uss4[ getElementModel ( thePlayer ) ] then setElementPosition ( hitPlayer, 1233.2, -1634.5, 27.3 ) end end local teleportid = getElementData ( source, "teleportid" ) if teleportid == 5 then local uss5 = { [67] = true, [29] = true, [105] = true, [106] = true, [107] = true, [111] = true, [311] = true, [112] = true, [113] = true } if uss5[ getElementModel ( thePlayer ) ] then setElementPosition ( hitPlayer, 1281.1, -1639.7, 27.3 ) end end local teleportid = getElementData ( source, "teleportid" ) if teleportid == 6 then local uss6 = { [67] = true, [29] = true, [105] = true, [106] = true, [107] = true, [111] = true, [311] = true, [112] = true, [113] = true } if uss6[ getElementModel ( thePlayer ) ] then setElementPosition ( hitPlayer, 1282.4, -1687, 34.8 ) end end end думаю, что проблема в том, что я не очень отличаю клиентскую и серверную сторону, хотя createMarker и getElementModel работают с обоих сторон помогите пожалуйста