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.