Alexs Posted December 21, 2014 Share Posted December 21, 2014 Hi everyone, these last two weeks I've been busy linking up one of my old resources with @samt2497's holoscreens. The results, although the resource is not finished yet and there are some errors to fix, are the following ones: The resource is fairly simple, weapons are bought and stored at player's arsenal, these are equippable and ammunition works separately, so that certain weapons are able to share the same type of ammunition. * Video's lag is made by the program that I use to record, it's not caused by the resource, conversely, the resource is capable of remain stable without reducing frames per second. Link to comment
AJXB Posted December 21, 2014 Share Posted December 21, 2014 Looks neat, nice, useful, great work, keep it up! Link to comment
DanHR Posted December 21, 2014 Share Posted December 21, 2014 The colors could be better (yellow, ugg) but appart from that, really good. You should do the same for hamburguers Link to comment
AJXB Posted December 21, 2014 Share Posted December 21, 2014 I think he used yellow because it's easier for the eye to notice, it's not about taste actually. Link to comment
3B00DG4MER Posted December 23, 2014 Share Posted December 23, 2014 How did you check if cursor is Range of the buttons or the holoscreen ?! Please Can you tell me ? anyway you Did a Nice Job Link to comment
Alexs Posted December 23, 2014 Author Share Posted December 23, 2014 How did you check if cursor is Range of the buttons or the holoscreen ?!Please Can you tell me ? anyway you Did a Nice Job The samt2497's resource takes care of that. Link to comment
3B00DG4MER Posted December 23, 2014 Share Posted December 23, 2014 How did you check if cursor is Range of the buttons or the holoscreen ?!Please Can you tell me ? anyway you Did a Nice Job The samt2497's resource takes care of that. What the function i use ? Link to comment
3B00DG4MER Posted December 23, 2014 Share Posted December 23, 2014 How did you check if cursor is Range of the buttons or the holoscreen ?!Please Can you tell me ? anyway you Did a Nice Job The samt2497's resource takes care of that. What the function i use ? i mean when the mouse is range of the button won't change color as i make it first of all how i can get mouse position in the holoscreen !! here is code : RTE_Demo = nil RTE_Holo = nil addEventHandler( "onClientResourceStart", resourceRoot, function ( startedRes ) local holoscreen,RT_ID,RTE = createHoloScreen(149,2482,16.5,40,0,90,5.35,6) --Create our holoscreen setElementData(holoscreen,"interactive","aim") -- Make it interactive on user aim if RTE then -- If we got the render Target of the screen then RTE_Demo = RTE RTE_Holo = holoscreen addEventHandler ( "onHoloScrenRender", RTE_Holo,drawHoloDemo) -- Event handler for every render of the holo screen end end ); function drawHoloDemo() local width, height = dxGetMaterialSize(RTE_Demo) local sW, sH = dxGetMaterialSize(RTE_Demo) dxSetRenderTarget(RTE_Demo,true) -- function isMouseWithinRangeOf(posX, posY, sizeX, sizeY) if isCursorShowing() == false then return false end local cx,cy = getCursorPosition() cx,cy = cx*sW,cy*sH if cx >= posX and cx <= posX+sizeX and cy >= posY and cy <= posY+sizeY then return true,cx,cy else return false end end boxes = { {x = sW/2-sW/10, y = sH/2-sH/7.4+sH/18, w = sW/5, h = sW/5, borderColor = tocolor(0, 200, 255)}, {x = sW/2-sW/6, y = sH/2-sH/7, w = sW/3, h = sH/20, borderColor = tocolor(0, 200, 255), boxD = "aqua", text = "Hi There", messageBox = "1"}, } buttons = { {x = boxes[2].x + boxes[2].w - sW/47 - sW/13, y = boxes[2].y + boxes[2].h - sH/14, w = sW/13, h = boxes[2].w/6.5, color = tocolor(255,255,255), borderColor = tocolor(0, 224, 224), text = "Click Here", func = "pressLogin"}, } for i,b in ipairs(buttons) do dxDrawRectangle(b.x ,b.y ,b.w,b.h,b.color) dxDrawRectangle(b.x , b.y , b.w, 1, b.borderColor) dxDrawRectangle(b.x , b.y , 1, b.h, b.borderColor) dxDrawRectangle(b.x, b.y + b.h , b.w, 1, b.borderColor) dxDrawRectangle(b.x + b.w, b.y , 1, b.h, b.borderColor) if b.text then dxDrawText ( b.text, b.x , b.y , b.x + b.w , b.y + b.h , tocolor(31,31,31), sW/1600, "default", "center", "center") end if isMouseWithinRangeOf(b.x , b.y , b.w, b.h) then dxDrawRectangle(b.x ,b.y ,b.w,b.h,tocolor(0,255,255)) if b.text then dxDrawText ( "Now Release", b.x , b.y , b.x + b.w , b.y + b.h , tocolor(255,255,255), sW/1600, "default", "center", "center") end end end local ix = getElementData(RTE_Holo,"ix") local iy = getElementData(RTE_Holo,"iy") if ix and iy then local tx = ix*width local ty = iy*height dxDrawLine (tx-13,ty, tx+13,ty,tocolor(255,0,0,255),1) dxDrawLine (tx,ty-13,tx,ty+13,tocolor(255,0,0,255),1) end -- dxSetRenderTarget() end Link to comment
Et-win Posted December 23, 2014 Share Posted December 23, 2014 Just ask in the scripting section and stop spamming here? Lol. Link to comment
3B00DG4MER Posted December 23, 2014 Share Posted December 23, 2014 Just ask in the scripting section and stop spamming here? Lol. i did but no one answer Link to comment
Alexs Posted December 24, 2014 Author Share Posted December 24, 2014 Just ask in the scripting section and stop spamming here? Lol. i did but no one answer local ix = getElementData(RTE_Holo,"ix") --X local iy = getElementData(RTE_Holo,"iy") --Y Link to comment
Malak Posted May 25, 2015 Share Posted May 25, 2015 Really, beautiful animation and dx good job ! Link to comment
joriss11 Posted May 27, 2015 Share Posted May 27, 2015 lets hope that it will turn out fully working, and become a open source Arms Shop scripts. Would use it 100%! Link to comment
AlFA# Posted June 30, 2015 Share Posted June 30, 2015 Alexs Steel Community to abandoned MTA, SA, do not expect the system to be released. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now