Jump to content

createProjectile has got me confused


Recommended Posts

i am trying to mount a minigun on a vehicle and fire it ( exo|mr hankey posted the script for me but i cant get the projectile working / firing

heres what i got so far

server - side

function mountminigun ( player, commandname ) 
         local vehicel = getPlayerOccupiedVehicle ( player ) 
         local minigun = createObject ( 2985, 0, 0, 0 ) 
         attachElementToElement ( minigun, player, 0, 0, 2 ) 
         triggerClientEvent ( "setfire", getRootElement(), minigun ) 
end 
  
addCommandHandler ( "biggun", mountminigun ) 

client - side

function fireminigun () 
         local x,y,z = getPelementPosition ( getPlayerOccupiedVehicle ( getLoacalPlayer() ) ) 
         createProjectile ( getLocalPlayer(), 19, x, y, z + 1, getLocalPlayer() ) 
end 
  
function setfirekey () 
         bindKey ( "vehicle_fire", "down", fireminigun ) 
         local mountedweapon = getAttachedElements ( getPlayerOccupiedVehicle ( getLocalPlayer() ) ) 
         for ElementKey, ElemenetValue in ipairs ( attchedElements ) do 
         setElementCollisionsEnabled ( ElementValue, false ) 
         end 
end 
  
addEvent ( "setfire", true ) 
addEventHandler ( "setfirekey", getLoacalPlayer(), setfirekey ) 

this mounts the gun but wont fire

i think im missing a variable from this line

createProjectile ( getLocalPlayer(), 19, x, y, z + 1, getLocalPlayer() ) 

but when i put 50 after z + 1 it still doesnt work

i have looked at the createProjectile part of ACE_GAMBIT's Carrier Resource and the MTA wiki but as far as i can see this should be working and i dont get any errors in the server log

i have also been talking to SAM FISHER and he is quite interested in getting this going as well

any help / advice greatly appreciated because ive been toying with this idea for quite some time

i would also like to be able to do the same thing but with an object as well :?

EDIT : im also trying to figure how to make rockets move a bit slower

i have been using the samsite script by ACE_GAMBIT but when it shoots at u its impossible to avoid the rocket so i want to turn down the speed a bit but after reading the wiki im unsure what values i need to set

is it FORCE or ELEMENT VELOCITY with x,y,z

Link to comment

i am trying to mount a minigun on a vehicle and fire it ( exo|mr hankey posted the script for me but i cant get the projectile working / firing

heres what i got so far

server - side

function mountminigun ( player, commandname )         local vehicel = getPlayerOccupiedVehicle ( player )         local minigun = createObject ( 2985, 0, 0, 0 )         attachElementToElement ( minigun, player, 0, 0, 2 )         triggerClientEvent ( "setfire", getRootElement(), minigun )end addCommandHandler ( "biggun", mountminigun )

client - side

function fireminigun ()         local x,y,z = getPelementPosition ( getPlayerOccupiedVehicle ( getLoacalPlayer() ) )         createProjectile ( getLocalPlayer(), 19, x, y, z + 1, getLocalPlayer() )end function setfirekey ()         bindKey ( "vehicle_fire", "down", fireminigun )         local mountedweapon = getAttachedElements ( getPlayerOccupiedVehicle ( getLocalPlayer() ) )         for ElementKey, ElemenetValue in ipairs ( attchedElements ) do         setElementCollisionsEnabled ( ElementValue, false )         endend addEvent ( "setfire", true )addEventHandler ( "setfirekey", getLoacalPlayer(), setfirekey )

this mounts the gun but wont fire

i think im missing a variable from this line

createProjectile ( getLocalPlayer(), 19, x, y, z + 1, getLocalPlayer() )

but when i put 50 after z + 1 it still doesnt work

i have looked at the createProjectile part of ACE_GAMBIT's Carrier Resource and the MTA wiki but as far as i can see this should be working and i dont get any errors in the server log

i have also been talking to SAM FISHER and he is quite interested in getting this going as well

any help / advice greatly appreciated because ive been toying with this idea for quite some time

i would also like to be able to do the same thing but with an object as well :?

EDIT : im also trying to figure how to make rockets move a bit slower

i have been using the samsite script by ACE_GAMBIT but when it shoots at u its impossible to avoid the rocket so i want to turn down the speed a bit but after reading the wiki im unsure what values i need to set

is it FORCE or ELEMENT VELOCITY with x,y,z

Link to comment

Client-side script

line:2 - getPelementPosition, I guess it should be getElementPosition

line:15 - function gets attached to "setfirekey" which does not exist because "setfire" event is added

Link to comment

Client-side script

line:2 - getPelementPosition, I guess it should be getElementPosition

line:15 - function gets attached to "setfirekey" which does not exist because "setfire" event is added

Link to comment

function fireMiniGun () 
if guiColorProgressBarGetProgress ( miniAmmoBar ) < 0 then return end 
for player,v in pairs(shootingPlayers) do 
    if isPlayerInVehicle ( player ) then 
        if player == getLocalPlayer() then 
            if guiColorProgressBarGetProgress ( miniAmmoBar ) == 0 then 
                triggerServerEvent ( "stopFire", getLocalPlayer() ) 
            else 
            local ammo = guiColorProgressBarGetProgress ( miniAmmoBar ) - 0.2 
            guiColorProgressBarSetProgress ( miniAmmoBar, ammo ) 
            ammo = ammo * 5 
            guiSetText ( miniAmmoText, " - Ammo: "..math.ceil(ammo).."" ) 
            guiSetVisible ( miniAmmoText, true ) 
            guiSetVisible ( miniAmmoBar, true ) 
            guiColorProgressBarSetColorAlpha ( miniAmmoBar, 0.5 ) 
            end 
        end 
        local vehicle = getPlayerOccupiedVehicle ( player ) 
            local distance = 100 
            if getVehicleID (vehicle) == 431 then 
                sX, sY, sZ = getElementPosition ( getLocalPlayer() ) 
            else 
                sX, sY, sZ = getElementPosition ( vehicle ) 
            end 
            local fX, fY, fZ = sX, sY, sZ 
            local rX, rY, rZ = getVehicleRotation (vehicle) 
            --local rX = 360 - rX 
            local rZ = 360 - rZ 
            local rY = 360 - rY 
            --local rZ = 360 - rZ 
            local offset = math.sqrt ( ( distance ^ 2 ) * 2 ) 
            sX = sX + math.sin ( math.rad ( rZ ) ) * 1.5 
            sY = sY + math.cos ( math.rad ( rZ ) ) * 1.5 
            fX = fX + math.sin ( math.rad ( rZ ) ) * offset 
            fY = fY + math.cos ( math.rad ( rZ ) ) * offset 
            fZ = fZ - math.tan ( math.rad ( rX ) ) * offset 
            local col, x, y, z, element = processLineOfSight ( sX, sY, sZ + 0.5, fX, fY, fZ - 0.5, true,true ) 
            if ( col ) then  
                bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 ) 
                moveObject ( bulletz, 200, x, y, z - 0.3 ) 
                setTimer ( destroyElement, 1000, 1, bulletz ) 
                if ( element ) then 
                    if ( getElementType ( element ) == "vehicle" ) then 
                        driver = getVehicleOccupant ( element ) 
                        if ( driver == getLocalPlayer() and driver ~= player ) then 
                            daHealth = getElementHealth ( element ) - 50 
                            if daHealth < 0 then 
                                daHealth = 0 
                            end 
                            setElementHealth ( element, daHealth ) 
                        end 
                    end 
                end 
            else 
                bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 ) 
                moveObject ( bulletz, 100, fX, fY, fZ + 0.5 ) 
                setTimer ( destroyElement, 500, 1, bulletz ) 
            end 
    end 
end 
end 

This is a complicated way to fire a minigun... I took this from the interstate client script. I don't know if it helps a bit or not. Maybe it's good to help create bullets with objectID 3106. Not a projectile but this way the minigun won't fire rockets I think.

Link to comment

function fireMiniGun ()if guiColorProgressBarGetProgress ( miniAmmoBar ) < 0 then return endfor player,v in pairs(shootingPlayers) do    if isPlayerInVehicle ( player ) then        if player == getLocalPlayer() then            if guiColorProgressBarGetProgress ( miniAmmoBar ) == 0 then                triggerServerEvent ( "stopFire", getLocalPlayer() )            else            local ammo = guiColorProgressBarGetProgress ( miniAmmoBar ) - 0.2            guiColorProgressBarSetProgress ( miniAmmoBar, ammo )            ammo = ammo * 5            guiSetText ( miniAmmoText, " - Ammo: "..math.ceil(ammo).."" )            guiSetVisible ( miniAmmoText, true )            guiSetVisible ( miniAmmoBar, true )            guiColorProgressBarSetColorAlpha ( miniAmmoBar, 0.5 )            end        end        local vehicle = getPlayerOccupiedVehicle ( player )            local distance = 100            if getVehicleID (vehicle) == 431 then                sX, sY, sZ = getElementPosition ( getLocalPlayer() )            else                sX, sY, sZ = getElementPosition ( vehicle )            end            local fX, fY, fZ = sX, sY, sZ            local rX, rY, rZ = getVehicleRotation (vehicle)            --local rX = 360 - rX            local rZ = 360 - rZ            local rY = 360 - rY            --local rZ = 360 - rZ            local offset = math.sqrt ( ( distance ^ 2 ) * 2 )            sX = sX + math.sin ( math.rad ( rZ ) ) * 1.5            sY = sY + math.cos ( math.rad ( rZ ) ) * 1.5            fX = fX + math.sin ( math.rad ( rZ ) ) * offset            fY = fY + math.cos ( math.rad ( rZ ) ) * offset            fZ = fZ - math.tan ( math.rad ( rX ) ) * offset            local col, x, y, z, element = processLineOfSight ( sX, sY, sZ + 0.5, fX, fY, fZ - 0.5, true,true )            if ( col ) then                 bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 )                moveObject ( bulletz, 200, x, y, z - 0.3 )                setTimer ( destroyElement, 1000, 1, bulletz )                if ( element ) then                    if ( getElementType ( element ) == "vehicle" ) then                        driver = getVehicleOccupant ( element )                        if ( driver == getLocalPlayer() and driver ~= player ) then                            daHealth = getElementHealth ( element ) - 50                            if daHealth < 0 then                                daHealth = 0                            end                            setElementHealth ( element, daHealth )                        end                    end                end            else                bulletz = createObject ( 3106, sX, sY, sZ + 0.6, 0, 0, 0 )                moveObject ( bulletz, 100, fX, fY, fZ + 0.5 )                setTimer ( destroyElement, 500, 1, bulletz )            end    endendend

This is a complicated way to fire a minigun... I took this from the interstate client script. I don't know if it helps a bit or not. Maybe it's good to help create bullets with objectID 3106. Not a projectile but this way the minigun won't fire rockets I think.

Link to comment

the last script i posted was attaching gun to player not vehicle so i have changed a little

server - side

 function mountminigun ( player, commandname ) 
         local vehicle = getPlayerOccupiedVehicle ( player )  
         local minigun = createObject ( 2985, 0, 0, 0 ) 
         attachElementToElement ( minigun, vehicle ) 
         triggerClientEvent ( player, "setfirekey", getRootElement() ) 
 end 
   
 addCommandHandler ( "biggun", mountminigun ) 

client - side

function fireminigun ( player ) 
         local x,y,z = getElementPosition ( getPlayerOccupiedVehicle ( getLoacalPlayer() ) ) 
         createProjectile ( getLocalPlayer(), 19, x, y, z + 1, 50, getLocalPlayer() ) 
end 
  
function setfirekey ( player ) 
         bindKey ( "m", "down", fireminigun ) 
         local mountedweapon = getAttachedElements ( getPlayerOccupiedVehicle ( getLocalPlayer() ) ) 
         for ElementKey, ElemenetValue in ipairs ( attchedElements ) do 
         setElementCollisionsEnabled ( ElementValue, false ) 
         end 
end 
  
addEventHandler ( "setfirekey", getRootElement(), setfirekey ) 

still not firing rocket yet

i have looked at the INTERSTATE69 scripts but they r just to complex for me at the moment

this is just to get me on the way to understanding how MTA works

im pretty sure im missing something small in the scripts but what im trying to do goes a bit beyond what the wiki explains so most of my progress has been trial and error

one last thing with above script is camera goes super close-up when the cars going slow but i have no idea why

Link to comment

the last script i posted was attaching gun to player not vehicle so i have changed a little

server - side

 function mountminigun ( player, commandname )         local vehicle = getPlayerOccupiedVehicle ( player )          local minigun = createObject ( 2985, 0, 0, 0 )         attachElementToElement ( minigun, vehicle )         triggerClientEvent ( player, "setfirekey", getRootElement() ) end   addCommandHandler ( "biggun", mountminigun )

client - side

function fireminigun ( player )         local x,y,z = getElementPosition ( getPlayerOccupiedVehicle ( getLoacalPlayer() ) )         createProjectile ( getLocalPlayer(), 19, x, y, z + 1, 50, getLocalPlayer() )end function setfirekey ( player )         bindKey ( "m", "down", fireminigun )         local mountedweapon = getAttachedElements ( getPlayerOccupiedVehicle ( getLocalPlayer() ) )         for ElementKey, ElemenetValue in ipairs ( attchedElements ) do         setElementCollisionsEnabled ( ElementValue, false )         endend addEventHandler ( "setfirekey", getRootElement(), setfirekey )

still not firing rocket yet

i have looked at the INTERSTATE69 scripts but they r just to complex for me at the moment

this is just to get me on the way to understanding how MTA works

im pretty sure im missing something small in the scripts but what im trying to do goes a bit beyond what the wiki explains so most of my progress has been trial and error

one last thing with above script is camera goes super close-up when the cars going slow but i have no idea why

Link to comment

The problem with rockets is that you can not make them go slower than the minimum travel speed. You will have to come up with something more sophisticated to make them less "smart". The heat seeking rocket for example can track objects as well. What I did in my POW game mode (Surface-to-Surface-Missile) is push the rockets up a little bit by adding force over the z-axis making it travel with a curve. It also does not target the player but an object that is created at the player's current position. This way the player has better change of survival because the rocket will not chase him down but remains to have enough speed to cause damage on impact.

EDIT:

Correction. What I said about minimum travel speed isn't entirely right. You can make a heat seeking rocket travel at a lower speed by not setting a target. This of course will result in the rocket going from A to B in a straight line (unless you add velocity over the x, y or z-axis).

EDIT:

Here's a simple example of mounting weapons. It attaches a mini-gun to the passenger side of the car and shoots projectiles. You can attach the gun with "/attachmod" and change projectile type with "/guntype [weaponType]". Like I said it is really basic and all it does is shoot a projectile with velocity over x and y-axis. You will have to make it work for the z-axis as well. In this example the projectiles go in a straight line even when the car's position is slightly tilted.

server

  
local guns = 
  { 
    [470] = 
      { 
        ["xPosOffset"] = 1.0, 
        ["yPosOffset"] = 0, 
        ["zPosOffset"] = 0 
      } 
  } 
  
function attachMod(playerSource, commandName) 
  local vehicle = getPlayerOccupiedVehicle(playerSource) 
  local gun = false 
  if (vehicle) then 
    gun = guns[getVehicleID(vehicle)] or false 
    if (gun) then 
      attachElementToElement(createObject(2985, 0, 0, -100, 0, 0, 0), vehicle, gun.xPosOffset, gun.yPosOffset, gun.zPosOffset, 0, 0, 90) 
      setElementData(vehicle, "toggleVehicleWeapon", true) 
    end 
  end 
end 
  
function detachMod(playerSource, commandName) 
  local vehicle = getPlayerOccupiedVehicle(playerSource) 
  if (vehicle) then 
    for _, element in ipairs(getAttachedElements(vehicle)) do 
      destroyElement(element) 
    end 
    setElementData(vehicle, "toggleVehicleWeapon", false) 
  end 
end 
  
addCommandHandler("/attachmod", attachMod, false) 
addCommandHandler("/detachmod", detachMod, false) 
  

client

  
local root = getRootElement() 
local player = getLocalPlayer() 
  
local toggleVehicleWeapon = false 
local previousTick = getTickCount() 
local projectileType = 21 
  
function updateVehicleWeapon(source, dataName) 
  if (getElementType(source) ==  "vehicle" and dataName == "toggleVehicleWeapon") then 
    toggleVehicleWeapon = (getElementData(source, dataName) and isPlayerInVehicle(player)) 
  end 
end 
  
function callbackDataChange(dataName) 
  updateVehicleWeapon(source, dataName) 
end 
  
function callbackVehicleEnter(thePlayer, seat) 
  updateVehicleWeapon(source, "toggleVehicleWeapon") 
end 
  
function callbackRender() 
  if (getControlState("vehicle_fire") and toggleVehicleWeapon) then 
    if (getTickCount() > (previousTick + 150) and previousTick > 0) then 
      fireProjectile() 
    end 
  end 
end 
  
function fireProjectile() 
  local vehicle = getPlayerOccupiedVehicle(player) 
  local gun = false 
  local gX, gY, gZ = 0, 0, 0 
  local gRotX, gRotY, gRotZ = 0, 0, 0 
  local pX, pY, pZ = 0, 0, 0 
  local vX, vY, vZ = 0, 0, 0 
  local currentLoSOffset = 3.5 
  local zPosOffset = 1.1 
  local thrust = 2.0 
  previousTick = 0 
  if (vehicle) then 
    if (#getAttachedElements(vehicle) > 0) then 
      gun = getAttachedElements(vehicle)[1] 
      if (gun) then 
        gX, gY, gZ = getElementPosition(gun) 
        gRotX, gRotY, gRotZ = getObjectRotation(gun) 
        pX = gX - math.sin(-math.rad(gRotZ + 90)) * currentLoSOffset 
        pY = gY + math.cos(-math.rad(gRotZ + 90)) * currentLoSOffset 
        pZ = gZ + zPosOffset 
        vX = math.sin (math.rad((gRotZ + 90))) * thrust 
        vY = math.cos(math.rad((gRotZ + 90))) * thrust 
        vZ = 0 
        createExplosion(pX, pY, pZ, 5, true, -1.0, false) 
        createProjectile(player, projectileType, pX, pY, pZ, 0, nil, 0, 0, 0, vX, vY, vZ) 
      end 
    end 
  end 
  previousTick = getTickCount() 
end 
  
function changeProjectileType(commandName, arg) 
  projectileType = tonumber(arg) or 21 
end 
  
addEventHandler("onClientElementDataChange", root, callbackDataChange, true) 
addEventHandler("onClientVehicleEnter", root, callbackVehicleEnter, true) 
addEventHandler("onClientRender", root, callbackRender, true) 
  
addCommandHandler("/guntype", changeProjectileType) 
  

  • Thanks 1
Link to comment

The problem with rockets is that you can not make them go slower than the minimum travel speed. You will have to come up with something more sophisticated to make them less "smart". The heat seeking rocket for example can track objects as well. What I did in my POW game mode (Surface-to-Surface-Missile) is push the rockets up a little bit by adding force over the z-axis making it travel with a curve. It also does not target the player but an object that is created at the player's current position. This way the player has better change of survival because the rocket will not chase him down but remains to have enough speed to cause damage on impact.

EDIT:

Correction. What I said about minimum travel speed isn't entirely right. You can make a heat seeking rocket travel at a lower speed by not setting a target. This of course will result in the rocket going from A to B in a straight line (unless you add velocity over the x, y or z-axis).

EDIT:

Here's a simple example of mounting weapons. It attaches a mini-gun to the passenger side of the car and shoots projectiles. You can attach the gun with "/attachmod" and change projectile type with "/guntype [weaponType]". Like I said it is really basic and all it does is shoot a projectile with velocity over x and y-axis. You will have to make it work for the z-axis as well. In this example the projectiles go in a straight line even when the car's position is slightly tilted.

server

 local guns =  {    [470] =      {        ["xPosOffset"] = 1.0,        ["yPosOffset"] = 0,        ["zPosOffset"] = 0      }  } function attachMod(playerSource, commandName)  local vehicle = getPlayerOccupiedVehicle(playerSource)  local gun = false  if (vehicle) then    gun = guns[getVehicleID(vehicle)] or false    if (gun) then      attachElementToElement(createObject(2985, 0, 0, -100, 0, 0, 0), vehicle, gun.xPosOffset, gun.yPosOffset, gun.zPosOffset, 0, 0, 90)      setElementData(vehicle, "toggleVehicleWeapon", true)    end  endend function detachMod(playerSource, commandName)  local vehicle = getPlayerOccupiedVehicle(playerSource)  if (vehicle) then    for _, element in ipairs(getAttachedElements(vehicle)) do      destroyElement(element)    end    setElementData(vehicle, "toggleVehicleWeapon", false)  endend addCommandHandler("/attachmod", attachMod, false)addCommandHandler("/detachmod", detachMod, false) 

client

 local root = getRootElement()local player = getLocalPlayer() local toggleVehicleWeapon = falselocal previousTick = getTickCount()local projectileType = 21 function updateVehicleWeapon(source, dataName)  if (getElementType(source) ==  "vehicle" and dataName == "toggleVehicleWeapon") then    toggleVehicleWeapon = (getElementData(source, dataName) and isPlayerInVehicle(player))  endend function callbackDataChange(dataName)  updateVehicleWeapon(source, dataName)end function callbackVehicleEnter(thePlayer, seat)  updateVehicleWeapon(source, "toggleVehicleWeapon")end function callbackRender()  if (getControlState("vehicle_fire") and toggleVehicleWeapon) then    if (getTickCount() > (previousTick + 150) and previousTick > 0) then      fireProjectile()    end  endend function fireProjectile()  local vehicle = getPlayerOccupiedVehicle(player)  local gun = false  local gX, gY, gZ = 0, 0, 0  local gRotX, gRotY, gRotZ = 0, 0, 0  local pX, pY, pZ = 0, 0, 0  local vX, vY, vZ = 0, 0, 0  local currentLoSOffset = 3.5  local zPosOffset = 1.1  local thrust = 2.0  previousTick = 0  if (vehicle) then    if (#getAttachedElements(vehicle) > 0) then      gun = getAttachedElements(vehicle)[1]      if (gun) then        gX, gY, gZ = getElementPosition(gun)        gRotX, gRotY, gRotZ = getObjectRotation(gun)        pX = gX - math.sin(-math.rad(gRotZ + 90)) * currentLoSOffset        pY = gY + math.cos(-math.rad(gRotZ + 90)) * currentLoSOffset        pZ = gZ + zPosOffset        vX = math.sin (math.rad((gRotZ + 90))) * thrust        vY = math.cos(math.rad((gRotZ + 90))) * thrust        vZ = 0        createExplosion(pX, pY, pZ, 5, true, -1.0, false)        createProjectile(player, projectileType, pX, pY, pZ, 0, nil, 0, 0, 0, vX, vY, vZ)      end    end  end  previousTick = getTickCount()end function changeProjectileType(commandName, arg)  projectileType = tonumber(arg) or 21end addEventHandler("onClientElementDataChange", root, callbackDataChange, true)addEventHandler("onClientVehicleEnter", root, callbackVehicleEnter, true)addEventHandler("onClientRender", root, callbackRender, true) addCommandHandler("/guntype", changeProjectileType) 

Link to comment

Oh My God :mrgreen:

ACE_GAMBIT u r AMAZING!

that is exactly what i needed

i seem to be getting the idea of how to do most other things ( with a LOT of help :lol: ) but guns on cars is just messing with my brain

hopefully your script will put me on the path to much greater things THANK U SO MUCH!!!!! :D

i really want to make my server public so i can see what people think of my ideas

i have nearly finished my car ferry / flying battle platforms / and INDEPENDENCE DAY : MIB inspired UFO attack / and my places of interest tour platform so it wont be much longer i hope

and i gotta say BIG THANKS AGAIN :D

EDIT : and thanks for the advice on rockets. it has come in very handy

EDIT2 : i understand your script ACE_GAMBIT up until the bit with the math.sin and math.rad

or at least i think i do :lol:

it looks to me like you do a check if players in a car and then check if it has gun attached then get rotation of the gun

but im not sure what the math does ( im guessing it sets which way to fire the projectile but im not sure )

dont worry if u dont have a chance to reply as i think i can figure this one out

Link to comment

Oh My God :mrgreen:

ACE_GAMBIT u r AMAZING!

that is exactly what i needed

i seem to be getting the idea of how to do most other things ( with a LOT of help :lol: ) but guns on cars is just messing with my brain

hopefully your script will put me on the path to much greater things THANK U SO MUCH!!!!! :D

i really want to make my server public so i can see what people think of my ideas

i have nearly finished my car ferry / flying battle platforms / and INDEPENDENCE DAY : MIB inspired UFO attack / and my places of interest tour platform so it wont be much longer i hope

and i gotta say BIG THANKS AGAIN :D

EDIT : and thanks for the advice on rockets. it has come in very handy

EDIT2 : i understand your script ACE_GAMBIT up until the bit with the math.sin and math.rad

or at least i think i do :lol:

it looks to me like you do a check if players in a car and then check if it has gun attached then get rotation of the gun

but im not sure what the math does ( im guessing it sets which way to fire the projectile but im not sure )

dont worry if u dont have a chance to reply as i think i can figure this one out

Link to comment
  • 3 years later...

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