Scripting Posted February 20, 2012 Posted February 20, 2012 Hi people I can see how work this function dxDrawLine3D
Castillo Posted February 20, 2012 Posted February 20, 2012 In the wiki page you'll find a example of how it works. Wiki example: function makeLineAppear() testVehicle = createVehicle ( 411, 0, 0, 5 ) -- Create our test vehicle. addEventHandler("onClientRender", getRootElement(), createLine) -- onClientRender keeps the 3D Line visible. end function createLine ( ) x1, y1, z1 = getElementPosition ( testVehicle ) -- Get test vehicles position. x2, y2, z2 = getElementPosition ( getLocalPlayer ()) -- Get local players position. dxDrawLine3D ( x1, y1, z1, x2, y2, z2, tocolor ( 0, 255, 0, 230 ), 2) -- Create 3D Line between test vehicle and local player. end addCommandHandler("test", makeLineAppear) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted February 20, 2012 Posted February 20, 2012 addEventHandler( 'onClientRender',root, function( ) local x,y,z = getElementPosition( localPlayer ) dxDrawLine3D( x,y,z,x,y+2,z,tocolor ( 0, 255, 0, 230 ), 2 ) dxDrawLine3D( x,y,z,x,y-2,z,tocolor ( 0, 255, 0, 230 ), 2 ) dxDrawLine3D( x,y,z,x+2,y,z,tocolor ( 0, 255, 0, 230 ), 2 ) dxDrawLine3D( x,y,z,x-2,y,z,tocolor ( 0, 255, 0, 230 ), 2 ) dxDrawLine3D( x,y,z,x,y,z+2,tocolor ( 0, 255, 0, 230 ), 2 ) dxDrawLine3D( x,y,z,x,y,z-2,tocolor ( 0, 255, 0, 230 ), 2 ) end ) http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Kenix Posted February 21, 2012 Posted February 21, 2012 No problem. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Scripting Posted February 21, 2012 Author Posted February 21, 2012 You have a idea to se this function in weapon?? Lazer?!
Kenix Posted February 21, 2012 Posted February 21, 2012 You can use this resource: https://community.multitheftauto.com/index.php?p= ... ils&id=652 http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Madonz Posted February 21, 2012 Posted February 21, 2012 But the command "test" doesnt work,just change it to other
Kenix Posted February 21, 2012 Posted February 21, 2012 Yes it is. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
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