Kafka Posted August 16, 2012 Share Posted August 16, 2012 Hello, I've got a problem. I'd like to create 3D line, but I can't. This is my script (clientside): function makeLineAppear() addEventHandler("onClientRender", getRootElement(), createLine) end function createLine ( ) dxDrawLine3D ( "1396.0999755859", "-2577.8999023438", "13", "2068.6000976563", "-2577.8999023438", "13", tocolor ( 0, 255, 0, 230 ), 2) end addCommandHandler("test", makeLineAppear) /debugscript 3 doesn't show anything. Link to comment
Callum Posted August 16, 2012 Share Posted August 16, 2012 All of the string values in dxDrawLine3D are supposed to be float points (numbers). Link to comment
Kafka Posted August 16, 2012 Author Share Posted August 16, 2012 Sorry, I don't understand you Can you give an example? Link to comment
denny199 Posted August 16, 2012 Share Posted August 16, 2012 You don't need to use " dxDrawLine3D ( 1396.0999755859, -2577.8999023438, 13, 2068.6000976563, -2577.8999023438, 13, tocolor ( 0, 255, 0, 230 ), 2) syntax: bool dxDrawLine3D ( float startX, float startY, float startZ, float endX, float endY, float endZ, int color[, int width, bool postGUI ] ) for more DxDrawLine3D examples go to: https://wiki.multitheftauto.com/wiki/DxDrawLine3D Link to comment
Kafka Posted August 16, 2012 Author Share Posted August 16, 2012 Ok, now it became visible for a very short time, and then dissapear. Link to comment
Guest Guest4401 Posted August 16, 2012 Share Posted August 16, 2012 function makeLineAppear() addEventHandler("onClientRender", getRootElement(), createLine) end function createLine ( ) dxDrawLine3D ( 1396.0999755859, -2577.8999023438, 13, 2068.6000976563, -2577.8999023438, 13, tocolor ( 0, 255, 0, 230 ), 2) end addCommandHandler("test", makeLineAppear) Link to comment
Kafka Posted August 16, 2012 Author Share Posted August 16, 2012 Ok, thanks, now it works Link to comment
qaisjp Posted August 16, 2012 Share Posted August 16, 2012 Please don't change your original post to update your finished code, this messes with the brains of people who read your topic after your problem has been solved and beats the purpose of having a forum. 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