Astari
Members-
Posts
44 -
Joined
-
Last visited
Everything posted by Astari
-
хоть я в этом и нуб, но попробуй это 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' ) else if ( health >= 93) and (health < 98 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h95.png' ) else if ( health >= 88) and (health < 93 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h90.png' ) else if ( health >= 83) and (health < 88 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h85.png' ) else if ( health >= 78) and (health < 83 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h80.png' ) else if ( health >= 73) and (health < 78 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h75.png' ) else if ( health >= 68) and (health < 73 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h70.png' ) else if ( health >= 63) and (health < 68 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h65.png' ) else if ( health >= 58) and (health < 63 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h60.png' ) else if ( health >= 53) and (health < 58 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h55.png' ) else if ( health >= 48) and (health < 53 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h50.png' ) else if ( health >= 43) and (health < 48 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h45.png' ) else if ( health >= 38) and (health < 43 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h40.png' ) else if ( health >= 33) and (health < 38 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h35.png' ) else if ( health >= 28) and (health < 33 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h30.png' ) else if ( health >= 23) and (health < 28 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h25.png' ) else if ( health >= 18) and (health < 23 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h20.png' ) else if ( health >= 13) and (health < 18 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h15.png' ) else if ( health >= -- s8) --> and (health < 13 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h10.png' ) else if ( health >= 3) and (health < 8 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h5.png' ) else if ( health >= 0) and (health < 3 ) then dxDrawImage ( screenWidth/2 - 50, 0, 128, 256, 'images/h0.png' ) else end end end end end end end end end end end end end end end end end end end end end end function HandleTheRendering ( ) addEventHandler("onClientRender", getRootElement(), drawHealth) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering)
-
area1 = createRadarArea ( 2415, -2049, 125, 120, 255, 255, 255, 150, getRootElement() ) area2 = createRadarArea ( 2540, -2049, 58, 200, 255, 255, 255, 150, getRootElement() ) function capture(thePlayer) local player = getElementPosition(thePlayer) local posX, posY = getElementPosition(thePlayer) local gangsta1 = getElementData(area1, "gang") local gangsta2 = getElementData(area2, "gang") if ( getAccountData(getPlayerAccount(thePlayer), "rifaData") > 6 ) then if ( gangsta1 == 0 ) or ( gangsta2 == 0 ) then if (isInsideRadarArea (area1, posX, posY )) then setRadarAreaColor( area1, 35, 25, 255, 150) setElementData(area1, "gang", 1) else if (isInsideRadarArea (area2, posX, posY )) then setRadarAreaColor( area2, 35, 25, 255, 150) setElementData(area2, "gang", 1) else end end else end else end end addCommandHandler("capture", capture) Можно как то полегче это сделать? Просто у меня 5 дат типа "rifaData" и 100 территорий, на каждую дату по 100 территорий лень писать
-
ну это геморно
-
У меня тоже раньше на локалке вылетало, только мта не понравился bullethole мод
-
Ведь с setAccountData & getAccountData тоже вроде прокатывает это
-
На РП серверах можно было сделать для банд другую ходьбу, а так она бесполезная. К машине как нибудь значение приписать можно?
-
В сампе я помню была такая функция "отключения суперкарла", которая делала бег и хотьбу как у обычных педов из сингла. Не это? bool setPedWalkingStyle ( ped thePed, int style ) https://wiki.multitheftauto.com/wiki/SetPedWalkingStyle
-
и еще вопрос, как сделать так чтобы закрыть окно через кнопку?
-
еще косяк, курсор не появляется чтобы тыкнуть кнопку
-
function troll() GUIEditor_Window = {} GUIEditor_Radio = {} GUIEditor_Window[1] = guiCreateWindow(324,255,371,272,"Trololo",true) GUIEditor_Radio[1] = guiCreateRadioButton(34,48,282,20,"Test",false,GUIEditor_Window[1]) GUIEditor_Radio[2] = guiCreateRadioButton(33,74,282,20,"Test",false,GUIEditor_Window[1]) GUIEditor_Radio[3] = guiCreateRadioButton(34,100,282,20,"Test",false,GUIEditor_Window[1]) GUIEditor_Radio[4] = guiCreateRadioButton(34,126,282,20,"Test",false,GUIEditor_Window[1]) GUIEditor_Radio[5] = guiCreateRadioButton(34,152,282,20,"Test",false,GUIEditor_Window[1]) GUIEditor_Radio[6] = guiCreateRadioButton(34,178,282,20,"Test",false,GUIEditor_Window[1]) GUIEditor_Radio[7] = guiCreateRadioButton(34,204,282,20,"Test",false,GUIEditor_Window[1]) end addcommandHandler("lol", troll) че не так то?
-
Просто писал setAccountData(theAccount,"rifaData",10) А надо было setAccountData(getPlayerAccount(thePlayer),"rifaData",10)
-
А все уже не нужна помощь =) Фантазию включил и получилось
-
Ребят, тут такой вопрос, как сделать чтобы сетаккаунтдата работал? а то только начал учиться писать скрипты setAccountData(theAccount, "rifaData", 10)
-
Tell me how to make function takePlayerMoney worked so that money does not become less than 0?
-
Скажите как сделать чтобы функция takePlayerMoney работала так чтобы в минус не уходили деньги?
-
ну мне хотябы что-то одно из этого, в данный момент мне требуются лицензии, хз сколько за лицензии берут, дальше сам попробую выучиться)
-
А и еще нужен скрипт на работы: механиком, чистильщиком улиц, водителем автобуса, копом, медиком, киллером, таксистом и пилотом
-
Прошу помочь вот с такими скриптами, машина должна быть привязана к игроку (то есть ее никто не угонит) и нужен скрипт на лицензии на машину, мото, автобус, грузовики, вертолет, самолет ну и яхта (лодки и т.п.). Ответить сюда либо в аську 647881786
