kamyrdol32 Posted June 5, 2017 Posted June 5, 2017 Hello, whos can help me? I want to create explosion when granate hit other object. Whos know how can i do that?
Moderators IIYAMA Posted June 5, 2017 Moderators Posted June 5, 2017 Can you script? If yes, then I will give you all functions you need. If no, then you should find a paid scripter. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
kamyrdol32 Posted June 5, 2017 Author Posted June 5, 2017 Yes, i can script. Now i have: function Stworz() if Uzyte then return end if isCursorShowing( ) then return end local Bron = getPedWeapon ( localPlayer ) if getPedAmmoInClip( localPlayer ) < 1 then return end if (Bron == 25) then if isPedAiming(localPlayer) then Uzyte = true local xm, ym, zm = getPedWeaponMuzzlePosition ( localPlayer ) local infx,infy,infz = getPositionInfrontOfLP () local x, y, z, lx, ly, lz, roll, dof = getCameraMatrix () local velx, vely = (infx-x)*0.2, (infy-y)*0.2 Granat = createProjectile(getLocalPlayer(),16,xm,ym,zm-0.05,0,nil,0,0,0,velx, vely,lz-z+0.1) local uSound = playSound3D( 'Files/wpn_grenadelauncher_fire_3d_01.wav', x, y, z ) setElementDimension( uSound, getElementDimension( localPlayer ) ) setElementInterior( uSound, getElementInterior( localPlayer ) ) setTimer ( function () Uzyte = false end, 60/throwInMinute*1000, 1) triggerServerEvent( "ZabierzAmmo", resourceRoot, localPlayer, 25, 1 ) end end end bindKey ( "mouse1", "down", Stworz ) And i want to create Explosion when granate hit other object.
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