Jump to content

JeViCo

Members
  • Posts

    605
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JeViCo

  1. Thank you for reply! I have already done it. I can see my output text in chat function window() if not veh then if not wind then addEventHandler("onClientRender",getRootElement(),dx_) wind = true showCursor (true) elseif wind then removeEventHandler("onClientRender",getRootElement(),dx_) wind = false showCursor(false) end end end addEvent("open_w", true) addEventHandler("open_w", root, window ) maybe something wrong in addEventHandler?
  2. Hello everyone! I have some code below(open a dx window on marker hit): function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end function dx_() col_1 = 255, 255, 255, 190 col_2 = 255, 255, 255, 255 ret_1 = 0,0,0,190 ret_2 = 0,0,0,255 if not info and not give then if isMouseInPosition( 329, 336, 387, 87 ) then bt_1 = col_2 else bt_1 = col_1 end outputChatBox("Done!") dxDrawImage(201, 279, 512, 208, "button.png", 0, 0, 0, tocolor(0, 0, 0, 255), false) dxDrawImage(207, 278, 512, 208, "button.png", 0, 0, 0, tocolor(bt_1), false) dxDrawText("Some text", 388, 348, 696, 402, tocolor(0, 0, 0, 255), 1.40, "pricedown", "center", "center", false, false, false, false, false) end end This part of code outputs in chat "Done!" so it work, however images and text are not drawing. Any ideas?
  3. use showroom instead but still it looks useful
  4. disable crosshair temporary using setPlayerHudComponentVisible + setTimer and then enable it
  5. link doesn't available anymore\ deleted
  6. not once there are 2 s.t.a.l.k.e.r projects on forum. Check it on your own. They are both dead. By the way there are a lot of talanted scripters and modellers, so they won't waste their time on the same work/// Thats why there are no active servers with this type of gameplay
  7. you mean just throw it away for many years? I don't think that it is a good idea
  8. looks like the project is dead. Share your work with other if you can't do it on your own)
  9. does anybody still have this map? Lost forever/// ?
  10. addEventHandler("onClientKey", root, function(button, press, release) local veh = getPedOccupiedVehicle(localPlayer) if veh and getVehicleController(veh) == localPlayer and guiGetVisible(mywindow) then if (press) and button == "mouse2" then outputChatBox("Button was pressed") guiSetVisible(mywindow, false) showCursor(false) elseif (release) and button == "mouse2" then outputChatBox("Button was released") guiSetVisible(mywindow, true) showCursor(true)--]] end end end ) same thing with this
  11. Hello everyone! What's wrong here? function mouse_move(button, state, player) local veh = getPedOccupiedVehicle(localPlayer) if veh and getVehicleController(veh) == localPlayer and guiGetVisible(mywindow) then if state == "down" then --this part works outputChatBox("Button was pressed") guiSetVisible(mywindow, false) showCursor(false) --this part doesn't work elseif state == "up" then outputChatBox("Button was released") guiSetVisible(mywindow, true) showCursor(true) end end end addEventHandler("onClientKey", root, mouse_move) bindKey("mouse2","both",mouse_move)
  12. i knew about that. I can't compare colors on the serverside because rgb turn car color into black each time. Also my script takes player's money even when he doesn't change colour. I have nothing to compare with
  13. Hello everyone! For example i have some sort of simple gui. When i press the button it opens openpicker. When i press "buy" button, vehicle color saves and it takes player money. How can i return vehicle's color before it changed with cancel button in colorpicker gui and in my gui too? Also, how can i make it become visible for everyone?
  14. Hello everyone! How can i compare 2 different rgb car colors? I can't compare just doing (r,g,b) ~= (r2,g2,b2)
  15. you didn't understand me . I mean that text scale doesn't change with different resolutions and i don't know how to fix that. It is big on small resolutions and small on high resolutions
  16. It'll be smaller in 2+ times in higher resolutions(
  17. It has a little bit different result but still keep stacking in one place( Thanks, everything on it's position. But now text doesn't fit in frames. How can i fix that?
  18. 1366x768 and everything stacks in top left corner. Their sizes are normal i'll try it
  19. Hello everyone, what's wring in code below? local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() dxDrawImage((screenW - 561) / 2, (screenH - 431) / 2, 561, 431, "images/back.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage((screenW - 517) / 2, (screenH - 465) / 2, 332, 86, "images/button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage((screenW - 522) / 2, (screenH - 459) / 2, 96, 96, "images/pay.png", 0, 0, 0, tocolor(0, 0, 0, 255), false) dxDrawImage((screenW - 520) / 2, (screenH - 456) / 2, 96, 96, "images/pay.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage((screenW - 906) / 2, (screenH - 179) / 2, 48, 48, "images/deny.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Контрольно-пропускной\nпункт", (screenW - 539 - 1) / 2, (screenH - 173 - 1) / 2, 827 - 1, 268 - 1, tocolor(0, 0, 0, 255), 2.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Контрольно-пропускной\nпункт", (screenW - 539 + 1) / 2, (screenH - 173 - 1) / 2, 827 + 1, 268 - 1, tocolor(0, 0, 0, 255), 2.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Контрольно-пропускной\nпункт", (screenW - 539 - 1) / 2, (screenH - 173 + 1) / 2, 827 - 1, 268 + 1, tocolor(0, 0, 0, 255), 2.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Контрольно-пропускной\nпункт", (screenW - 539 + 1) / 2, (screenH - 173 + 1) / 2, 827 + 1, 268 + 1, tocolor(0, 0, 0, 255), 2.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Контрольно-пропускной\nпункт", (screenW - 539) / 2, (screenH - 173) / 2, 827, 268, tocolor(255, 255, 255, 255), 2.50, "default", "center", "center", false, false, false, false, false) dxDrawText("Оплатить проезд", (screenW - 614) / 2, (screenH - 480) / 2, 814, 534, tocolor(0, 0, 0, 255), 2.30, "default", "center", "center", false, false, false, false, false) dxDrawText("Оплатить проезд", (screenW - 614) / 2, (screenH - 477) / 2, 814, 531, tocolor(255, 255, 255, 255), 2.30, "default", "center", "center", false, false, false, false, false) dxDrawImage((screenW - 517) / 2, (screenH - 338) / 2, 332, 86, "images/button.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("$", (screenW - 665) / 2, (screenH - 352) / 2, 691, 405, tocolor(0, 0, 0, 255), 4.00, "default", "center", "center", false, false, false, false, false) dxDrawText("$", (screenW - 663) / 2, (screenH - 348) / 2, 689, 401, tocolor(255, 254, 254, 255), 4.00, "default", "center", "center", false, false, false, false, false) end ) guieditor makes only first line correct. Everything below 1 line is incorrect (coordinates)
  20. i have a lot of variables to check in table. My event happens when player hit the marker, so it work several times
  21. Hi everyone! I have some variables which i put in table like local table = {el1,el2,el3} how can i compare other variable through elements in table? like if place == el1 ?
  22. JeViCo

    XML problem

    never mind. Script save settings somewhere. Settings.xml doesn't appear in script folder, however it has admin acl rights
×
×
  • Create New...