Home / Forums / Modders Corner / Mafia Editing / Mafia Mod Request / Car First Person View (with lua scripts)

Car First Person View (with lua scripts)

Home / Forums / Modders Corner / Mafia Editing / Mafia Mod Request / Car First Person View (with lua scripts)

8 replies
13 years, 7 months ago
#6824

Hi, someone knows if it is possible to change the car view with lua commands ?

I wanted to play the main story of Mafia 2 with a FPV in car, like the excellent one in JA Freeride mode by Existenz, but it works only on Freeride.

 

Thanks for your help.

13 years, 7 months ago
#13261

Hi

 

FreeRide Script

In Car

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),true)

game.game:GetActivePlayer():ShowModel(false)

Out Car

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),false)

game.game:GetActivePlayer():ShowModel(true)

 

with injector:

In Car

DelayBuffer:Insert(function(l_1_0)

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),true)

game.game:GetActivePlayer():ShowModel(false)

end,{l_1_0},250,1,false)

Out Car

DelayBuffer:Insert(function(l_1_0)

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),false)

game.game:GetActivePlayer():ShowModel(true)

end,{l_1_0},250,1,false)

 

 

Script for injector v6

1ere clic Fx = On

2eme clic Fx = Off

DelayBuffer:Insert(function(l_1_0)

if i==nil

then i=1

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),true)

game.game:GetActivePlayer():ShowModel(false)

else i=nil

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),false)

game.game:GetActivePlayer():ShowModel(true)

end

end,{l_1_0},250,1,false)

and also view my topic

http]

13 years, 7 months ago
#13271

Thanks a lot it works perfect ! (merci beaucoup !) :cheer:

Just one little thing. The mouse view is reversed (only the up and down), how I change that without changing the main option every time ? (because I’m playing in normal mode not reverse)

13 years, 7 months ago
#13285

Sorry, I don’t know.

13 years, 7 months ago
#13290

Ok, thanks anyway <img decoding=” data-emoticon=”” srcset=”/wp-content/uploads/invision_emoticons/wink@2x.png 2x” width=”20″ height=”20″>

13 years, 7 months ago
#13293

Thanks a lot it works perfect ! (merci beaucoup !) :cheer:

Just one little thing. The mouse view is reversed (only the up and down), how I change that without changing the main option every time ? (because I’m playing in normal mode not reverse)

i have the same problem in zahar999’s free ride and i am pretty sure it can’t be modified…..

13 years, 6 months ago
#14937

Hi 

FreeRide Script

In Car

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),true)

game.game:GetActivePlayer():ShowModel(false)

Out Car

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),false)

game.game:GetActivePlayer():ShowModel(true)

 

with injector:

In Car

DelayBuffer:Insert(function(l_1_0)

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),true)

game.game:GetActivePlayer():ShowModel(false)

end,{l_1_0},250,1,false)

Out Car

DelayBuffer:Insert(function(l_1_0)

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),false)

game.game:GetActivePlayer():ShowModel(true)

end,{l_1_0},250,1,false)

 

 

Script for injector v6

1ere clic Fx = On

2eme clic Fx = Off

DelayBuffer:Insert(function(l_1_0)

if i==nil

then i=1

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),true)

game.game:GetActivePlayer():ShowModel(false)

else i=nil

game.cameramanager:GetPlayerMainCamera(0):EnableFPV(game.game:GetActivePlayer(),false)

game.game:GetActivePlayer():ShowModel(true)

end

end,{l_1_0},250,1,false)

and also view my topic

http]

 

Hey existenZ, where do i paste this for freeride? (Sorry i’ve never modded m2 before)

13 years, 6 months ago
#14940

With lua injector. Here’s the link: http://www.mafiascene.net/downloads/vie … injector-6

Backup original files, copy the pc folder to the game directory

 

 

Tutorial how to use the “Injector”:

1. Copy the script into the “F1.txt” in the folder “userscripts”

2. Run the game

3. Minimize the game

4. Run the “MafiaInjector.exe”

5. Go back to the game

6. Press the key “F1”

 

PS: You can also copy the script in any document (located in the folder “userscripts”). But then in the game you’ll need to press the corresponding button (from “F1” to “F12”)

 

13 years, 6 months ago
#14944

Thanks farhad <img decoding=” data-emoticon=”” srcset=”/wp-content/uploads/invision_emoticons/smile@2x.png 2x” width=”20″ height=”20″>

  • You must be logged in to reply to this topic.