MTA Team 0xCiBeR Posted December 22, 2013 MTA Team Share Posted December 22, 2013 This is a usfull function created by Bc# and posted in the spanish forums. I translated it and Add it to the wiki All credits go to Bc# dxDrawAnimWindow Link to comment
Renkon Posted December 22, 2013 Share Posted December 22, 2013 Please, could you order it alphabetically on the useful functions template? Evenmore, would you mind translating alto and ancho into height and width please? And one more thing, you have practically copy pasted the code twice, as on the usage example you are writing exactly the same. Nonetheless, good function and keep up developing new ones. Link to comment
Renkon Posted December 22, 2013 Share Posted December 22, 2013 Please, could you order it alphabetically on the useful functions template?Evenmore, would you mind translating alto and ancho into height and width please? And one more thing, you have practically copy pasted the code twice, as on the usage example you are writing exactly the same. Nonetheless, good function and keep up developing new ones. rekon foi voce que criou o addon_dayzGive ? tem outro resource para dayz ? Please speak English here. Yes, I did DayZGIP but I didn't make any other resources for DayZ Link to comment
Gallagher Posted December 22, 2013 Share Posted December 22, 2013 Please, could you order it alphabetically on the useful functions template?Evenmore, would you mind translating alto and ancho into height and width please? And one more thing, you have practically copy pasted the code twice, as on the usage example you are writing exactly the same. Nonetheless, good function and keep up developing new ones. rekon foi voce que criou o addon_dayzGive ? tem outro resource para dayz ? Please speak English here. Yes, I did DayZGIP but I didn't make any other resources for DayZ ok Link to comment
.:HyPeX:. Posted December 23, 2013 Share Posted December 23, 2013 I'm sorry, but i dont see this funcion on usage at all here, its just the name of the function. function dxDrawAnimWindow(text,alto,ancho,color,font,anim) local x,y = guiGetScreenSize() btAncho = ancho btAlto = alto/20 local now = getTickCount() local elapsedTime = now - start local endTime = start + 1500 local duration = endTime - start local progress = elapsedTime / duration local x1, y1, z1 = interpolateBetween ( 0, 0, 0, ancho, alto, 255, progress, anim) local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btAncho, btAlto, btAlto/11, progress, anim) posx = (x/2)-(x1/2) posy = (y/2)-(y1/2) dxDrawRectangle ( posx, posy-y2, x2, y2, color ) dxDrawRectangle ( posx, posy, x1, y1, tocolor ( 0, 0, 0, 200 ) ) dxDrawText ( text, 0, -(y1)-y2, x, y, tocolor ( 255, 255, 255, 255 ), z2,font,"center","center") end As far as i'm concerned, i should paste this on client and call it.. i dont really see the the usage of bool dxDrawAnimWindow ( string text, int alto, int ancho, int color, string element font, string anim) EDT//: On none of the examples we can see onClientRender / onClientPreRender, so i dont know how this is going to work.. Link to comment
MTA Team 0xCiBeR Posted December 23, 2013 Author MTA Team Share Posted December 23, 2013 (edited) OMG, use your brains..Every one knows the only way to draw anything in dx is using onClientRender. Anyway added to requiered stuff Besides, i'm not the creator.And the wiki is free to edit..So, if you want to make an example, edit it.I just gave the basics on using it. @Renkon you are right, missed the order in the template..Thanks! Edited December 23, 2013 by Guest Link to comment
Renkon Posted December 23, 2013 Share Posted December 23, 2013 OMG, use your brains..Every one knows the only way to draw anything in dx is using onClientRender.Besides, i'm not the creator.And the wiki is free to edit..So, if you want to make an example, edit it.I just gave the basics on using it. @Renkon you are right, missed the order in the template..Thanks! Please, could you add an example? Link to comment
MTA Team 0xCiBeR Posted December 23, 2013 Author MTA Team Share Posted December 23, 2013 Example script added.. 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