...... jaki? tam kod....
local konkret = createWeapon ( "ak-47", 0, 0, -999 )
function weapon()
local veh = getPedOccupiedVehicle ( localPlayer )
if (veh) then
if (getElementModel(veh) == 514) then
attachElements(konkret,veh,-0.6,2.3,0.5,0,0,90)
setElementAlpha(konkret,0)
end
end
end
addEventHandler("onClientVehicleEnter", getRootElement(), weapon)
function strzal()
local veh = getPedOccupiedVehicle ( localPlayer )
if (veh) then
if (getElementModel(veh) == 514) and (getElementData(veh,"strzal") == 0) then
setElementData(veh,"strzal",1)
setWeaponClipAmmo(konkret, 99999)
setWeaponState(konkret, "firing")
else
setElementData(veh,"strzal",0)
setWeaponState(konkret, "ready")
end
end
end
---I tam jeszcze na ko?cu jest bind na mouse2 wywo?uj?cy funkcj? strzal