Mann56 Posted May 27, 2015 Posted May 27, 2015 Guys i need help in this https://forum.multitheftauto.com/viewto ... 08&t=79800 It's a holoscreen resource but i do not know how to make a window i read the code many times but couldn't make it out can someone help me by telling me how can i make a window in it and how to get cursor position? "When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag" "Have confidence in yourself, no problem is impossible in life"
xXMADEXx Posted May 27, 2015 Posted May 27, 2015 Post your code.. The Ultimate Lua Tutorial! | MTA PHP SDK
Mann56 Posted May 27, 2015 Author Posted May 27, 2015 Post your code.. Dude I mean in the demo.lua file of the resource it creates a holoscreen by default but it doesn't show when I start it and I wanted to know that how can I know if cursor position is on holoscreen? "When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag" "Have confidence in yourself, no problem is impossible in life"
Mann56 Posted May 27, 2015 Author Posted May 27, 2015 RTE_Demo = nil RTE_Holo = nil addEventHandler( "onClientResourceStart", resourceRoot, function ( startedRes ) local holoscreen,RT_ID,RTE = exports.holo:createHoloScreen(149,2482,16.5,40,0,90,1.35,2) --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) dxSetRenderTarget(RTE_Demo,true) -- dxDrawRectangle (0,0,10,1000,tocolor(0,255,0,200),false) dxDrawRectangle (0,0,1000,1000,tocolor(0,255,255,200),false) 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 Here i exported holoscreen from it's resource which i named holo but then also it gives an error failed to call 'holo:createHoloScreen' [string "?"] "When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag" "Have confidence in yourself, no problem is impossible in life"
Mann56 Posted May 27, 2015 Author Posted May 27, 2015 Bump "When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag" "Have confidence in yourself, no problem is impossible in life"
Mann56 Posted May 28, 2015 Author Posted May 28, 2015 Bump Anybody can help? "When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag" "Have confidence in yourself, no problem is impossible in life"
Mann56 Posted June 1, 2015 Author Posted June 1, 2015 My Resource : "Mann" type="script" name="demo" /> client="1.4.0" server="1.4.0" /> The main resource: "Samt2497" type="script" name="HoloScreen" /> client="1.4.0" server="1.4.0" /> "When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag" "Have confidence in yourself, no problem is impossible in life"
Blaawee Posted June 3, 2015 Posted June 3, 2015 Change the meta of the main resource to : "Samt2497" type="script" name="HoloScreen" /> client="1.4.0" server="1.4.0" />
Mann56 Posted June 4, 2015 Author Posted June 4, 2015 Oh damn i forgot to add the export. Thanks EDIT : Dunno why but still not working i can't see anything. No debug errors "When i'll grow older, i'll be stronger, they'll call me freedom, just like a waving flag" "Have confidence in yourself, no problem is impossible in life"
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