Hello there,
I've been trying to create a weapon (uzi) and attach it on a vehicle (hydra) the weapon should fire when I click the left mouse button.
I am stuck at the very beginning of the script (trying to get the uzi to spawn) and I just cannot progress any further.
function hydraGuns()
local vehicle = getPedOccupiedVehicle(localPlayer)
if(vehicle)then
if getElementModel(vehicle) == 520 then
local x, y, z = getElementPosition(vehicle)
local weapon = createWeapon("uzi", x, y, z)
outputChatBox ("Hydra guns are installed")
end
end
end
What am I doing wrong?