Jump to content

Laser


-Doc-

Recommended Posts

local x,y,z = 0, 0, 0 -- 1st position 
local x1,y1,z1 = 5, 5, 5 -- 2nd position 
  
addEventHandler ( "onClientRender", root, 
    function ( ) 
        local x, y = getScreenFromWorldPosition ( x, y, z ) 
        local x1, y1 = getScreenFromWorldPosition ( x1, y1, z1 ) 
        dxDrawLine ( x, y, x1, y1, tocolor ( 255, 0, 0, 255 ) 
    end 
); 

Link to comment
function laser ( creator) 
        if getElementType(creator) == "vehicle" then 
        if getElementModel(creator) == 432 then 
        local x, y = getVehicleComponentPosition( creator, "misc_c" ) 
        local x1, y1 = getVehicleComponentPosition( creator, "misc_a" ) 
        dxDrawLine ( x, y, x1, y1, tocolor ( 255, 0, 0, 255 ) 
    end 
end 
end 
end 
addEventHandler("onClientVehicleEnter", getRootElement(), laser) 

whats worng here

Link to comment

or how to fix this

function laser ( creator) 
        if getElementType(creator) == "vehicle" then 
        if getElementModel(creator) == 432 then 
        local x, y = getVehicleComponentPosition( creator, "misc_c" ) 
        local x1, y1 = getVehicleComponentPosition( creator, "misc_a" ) 
        dxDrawLine ( x, y, x1, y1, tocolor ( 255, 0, 0, 255 ) 
    end 
end 
end 
end 
addEventHandler("onClientVehicleEnter", getRootElement(), laser) 

Link to comment
  • 2 years later...
On 5/8/2015 at 15:11, WhoAmI said:

And I need weed and who the hell cares? No one. Try to make it by your own and if you have a problem - post it here and we will show you a way to do that. You can't get everything you want.

Such Such Late Reply but can u show me how to draw an image when i enter rhino and attach it to misc_c?

On 5/8/2015 at 15:11, WhoAmI said:

And I need weed and who the hell cares? No one. Try to make it by your own and if you have a problem - post it here and we will show you a way to do that. You can't get everything you want.

I got the png of that inage in the imgur link.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...