function cdoshoot()
if bindTrigger == 1 then
if not isPedDead(cLP) then
bindTrigger = 0
local x,y,z = getElementPosition(theVehicle)
local rX,rY,rZ = getElementRotation(theVehicle)
local x = x+4*math.cos(math.rad(rZ+90))
local y = y+4*math.sin(math.rad(rZ+90))
createProjectile(theVehicle, 19, x, y, z, 1.0, nil)
setTimer(allowShoots, 3000, 1)
end
end
end
This is my shooting script.
And I want to detect player
onPlayerWasted
and repair him and give money!
Thank you.