Jump to content

Rot Weapon


WASSIm.

Recommended Posts

hi guys. i working for script make swat tank shot like minigun but i have problem with Rot

addEventHandler("onClientRender", root, 
function ( ) 
    for k, thePlayer in ipairs(getElementsByType("player")) do 
        local theVehicle = getPedOccupiedVehicle(thePlayer) 
        if (theVehicle) and (weapon[theVehicle]) then 
            local xt, yt, zt = getVehicleTurretPosition(theVehicle) 
            local xt, yt = math.deg(xt), math.deg(yt) 
            attachElements(weapon[theVehicle], theVehicle, 0, 0, 1.6, 0, yt, xt+90) 
        end 
    end 
end) 

Link to comment

Check the values of xt and yt before you attachElements:

dxDrawText( "X: " .. tostring(xt) .. ";   Y:" .. tostring(yt), 10, 200 ); 

Validate these values, if they're correct then play with the values in attachElements call.

Link to comment
Check the values of xt and yt before you attachElements:
dxDrawText( "X: " .. tostring(xt) .. ";   Y:" .. tostring(yt), 10, 200 ); 

Validate these values, if they're correct then play with the values in attachElements call.

its problem with Rot weapon object and other weapons like it u can open map editor and change rot weapons and see.

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...