Jump to content

Move camera on shoots


BorderLine

Recommended Posts

Posted

Hi everyone

someone know what function i need add to move the camera when players shoots??

I was looking about setcameramatrix, but i dont know how i can use it.. or if anyone know other function..

thanks for your time and attention

Posted

thanks man

look i have this

local function playGunfireSound(weaponID) 
    local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source) 
    local px, py, pz = getElementPosition ( source ) 
  
       if weaponID == 22 then --colt45 
        local sound = playSound3D("sounds/weap/Colt45.mp3", muzzleX, muzzleY, muzzleZ, false) 
        setSoundMaxDistance(sound, 40) 
  
    elseif weaponID == 25 then--shotgun 
            local sound = playSound3D("sounds/weap/Shotgun.mp3", muzzleX, muzzleY, muzzleZ, false) 
            setSoundMaxDistance(sound, 40) 
        createExplosion ( px, py, pz, 12 , false , 0.5 , false ) 

all its good, but when i show this appear in the road

how i can delete it?

sinttuloaf.jpg

Posted

You can delete it with shader, if I'm right this explosion effect on the ground is a texture and you can replace it with an empty alpha texture. I mean a black texture with an alpha that show nothing of the textures (no pixels), a totally black alpha. If you can replace the moon texture then you can replace other textures in particle.txd too and thats cool.

Posted

Nice point benox. Well finaly i fix it with something simple

like this

createExplosion ( px, py, pz-20, 12 , false , 0.5 , false ) 

the camera move good and the exlosion its created under the ped .. so all good for now

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