I edited the humvee drive script to be an artilery gun script
, you press Enter then you have minigun to shoot with , press g to leave the gun , here's the code :
;Requires Ply's Mod V1.07+
;Artificial Intelligence Script
;Header
desc = HumVee Drive Script (Vehikleh!!!!)
;Triggers
;///// Load up HUD and Humvee camera, set humvee cam offsets for third person perspective
;///// Dim variables necessary
:state=0:hudreset,hudx=100,hudy=90,hudtext=Press Action to Hold,hudname=driveprompt,hudhide=1,hudmake=display
:state=0:makecamera=HumveeCam
:state=0:offsetcamy=HumveeCam 70,offsetcamfore=HumveeCam -50
:state=0:dimvar=Temp,dimvar=TempX,dimvar=TempY,dimvar=HAccel,setvar=HAccel 0.5,dimvar=HVel,dimvar=HMaxVel
:state=0:animate=1,state=1
;///// Show Use HUD when player approaches
:state=1,plrdistwithin=100:hudshow=driveprompt,hudfadeout=driveprompt
;///// If player activates SpyBot, then disable plr input using startmenu
;///// and view through the humvee third person camera, also loop motor sound
:state=1,plrdistwithin=100,plrusingaction=1:viewcam=HumveeCam,plrcoloff,loopsound=audiobank/atmos/motorhum.wav,state=2
;///// Hide The Player HUDs
:state=2:hudunshow=PlrLives,hudunshow=PlrLivesNum,hudunshow=PlrHealth,hudunshow=PlrHealthNum,hudunshow=GunPic,hudunshow=PlrAmmo,hudunshow=PlrArmor,hudunshow=PlrArmorNum,hudunshow=PlrMoney,hudunshow=PlrMoneyNum,state=3
;///// Make sure Camera follows the Humvee
:state=3:cameraposx=HumveeCam $EPX,cameraposy=HumveeCam $EPY,cameraposz=HumveeCam $EPZ
:state=3:cameraposx=0 $EPX,cameraposy=0 $EPY,cameraposz=0 $EPZ
;///// Give Humvee acceleration
:state=3:giveweap=modernday\minigun,coloff
;///// Restore normal FPS Cam when "G" is pressed
;///// Need to restore player control with "stopmenu" and view the normal camera and stop motor sound
:state=3,keypressed=34 1:state=4,coloff
;///// Make humvee cam look around based on mouse movement
:state=3:setvar=TempX $MMY,setvar=TempY $MMX,divvar=TempX 7,divvar=TempY 7,addvar=TempX $CAX_HumveeCam,addvar=TempY $CAY_HumveeCam
:state=3:cameraangx=HumveeCam %TempX,cameraangy=HumveeCam %TempY
;///// Show the Player HUDs again
:state=4:hudshow=PlrLives,hudshow=PlrLivesNum,hudshow=PlrHealth,hudshow=PlrHealthNum,hudshow=GunPic,hudshow=PlrAmmo,hudshow=PlrArmor,hudshow=PlrArmorNum,hudshow=PlrMoney,hudshow=PlrMoneyNum,removeweap=modernday\minigun
;///// Position Player outside of driver door
:state=4:cameraposx=HumveeCam $EPX,cameraposy=HumveeCam $EPY,cameraposz=HumveeCam $EPZ
:state=4:setvar=TempY $EAY,subvar=TempY 90
:state=4:cameraangx=HumveeCam 0,cameraangy=HumveeCam %TempY,cameraangz=HumveeCam 0
:state=4:movecam=HumveeCam 70
:state=4:setvar=TempX $CPX_HumveeCam,cameraposx=0 %TempX
:state=4:setvar=TempX $CPY_HumveeCam,addvar=TempX 100,cameraposy=0 %TempX
:state=4:setvar=TempX $CPZ_HumveeCam,cameraposz=0 %TempX
:state=4:addvar=TempY 90,cameraangy=HumveeCam %TempY
:state=4:cameraangy=0 %TempY
:state=4:stopmenu,viewcam=0,plrcolon,stopsound,state=1
;End of Script
but there is a proplem , the bullets hit the gun and not throwing out.
i tried to make coloff , bulletpass but it didn't work , please help with this , and if someone could i hope he makes the gun rotates with the camera rotating if possiple.
thanks.
"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest