» Topics

Home / Forums / Topics

Viewing 15 topics - 106 through 120 (of 1,432 total)

Lua codes to take shower, use toilet, wash hands in joe’s flat

Before performing these animations you should first have basic_anim.sds with all required animations in it








You can download it here with all lua files, injector included http://www.mediafire.com/file/1ar7645pqcxarb1/Interact.zip/file








After downloading copy all files to mafia ii/pc folder and backup basic_anim.sds if you want








After launching game and injector, Press F1 to "use toilet", F2 to "take shower", F3 to return to default walk style after taking shower, F4 to wash hands, F5 to sit down








Note: these animations only works in Joe's flat due to newvector commands. You can change the vector if you want other places








Here's video showcase 




















 








Sorry if some of these are buggy as I am pretty newbie in such lua codes. It even took me hours to figure out how to use lua and edit sds files








I am also having trouble in "setdir" commands to set the direction of the player. Every time I use this command with the recorded coordinate the lua refuses to perform these animations. Also I am still finding ways to use the E key without the need of injector. If any expert in lua codding here please tell me how can I improve these lua scripts by using E key and how can I change the direction of the player using vector commands and not just the position. Thanks








 








ply=game.game:GetActivePlayer()

DelayBuffer:Insert(function(l_1_0)

CommandBuffer:Insert(l_6_0,{

function(l_1_0)return ply:SetControlStyle(enums.ControlStyle.LOCKED)end,

function(l_2_0)return ply:SetPhysState(enums.PhysicsState.DISABLED)end,

function(l_2_0)return ply:SetPos(Math:newVector(78.977386474609, 894.04113769531, -13.307103157043))end,

function(l_2_0)return ply:AnimPlay("sc_worker_pissing_in", false)end,

function(l_3_0)return ply:AnimPlay("sc_worker_pissing_stat", false)end,

function(l_4_0)return ply:AnimPlay("sc_worker_pissing_stat", false)end,

function(l_5_0)return ply:AnimPlay("sc_worker_pissing_wide", false)end,

function(l_6_0)return ply:AnimPlay("sc_worker_pissing_out", false)end,

function(l_2_0)return ply:SetPhysState(enums.PhysicsState.ENABLED)end,

function(l_8_0)return ply:SetControlStyle(enums.ControlStyle.FREE)end})

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






ply=game.game:GetActivePlayer()

DelayBuffer:Insert(function(l_1_0)

CommandBuffer:Insert(l_6_0,{

function(l_1_0)return ply:SetControlStyle(enums.ControlStyle.LOCKED)end,

function(l_2_0)return game.hud:FaderFadeOut(500)end,

function(l_3_0)return ply:SetPos(Math:newVector(86.15470123291, 891.68402099609, -13.3220911026))end,

function(l_4_0)game.game:ChangePlayerModel("vitnah_t")end,

function(l_5_0)return game.hud:FaderFadeIn(500)end,

function(l_6_0)return ply:AnimPlay("sc_prisoner_shower_wash_in", false)end,

function(l_7_0)return ply:AnimPlay("sc_prisoner_shower_wash_stat", false)end,

function(l_8_0)return ply:AnimPlay("sc_prisoner_shower_wash_c", false)end,

function(l_9_0)return ply:AnimPlay("sc_prisoner_shower_wash_out", false)end,

function(l_10_0)return ply:AnimPlay("sc_prisoner_shower_wash_in", false)end,

function(l_7_0)return ply:AnimPlay("sc_prisoner_shower_wash_stat", false)end,

function(l_11_0)return ply:AnimPlay("sc_prisoner_shower_wash_b", false)end,

function(l_14_0)return ply:AnimPlay("sc_prisoner_shower_wash_in", false)end,

function(l_16_0)return ply:AnimPlay("sc_prisoner_shower_wash_a", false)end,

function(l_7_0)return ply:AnimPlay("sc_prisoner_shower_wash_stat", false)end,

function(l_17_0)return ply:AnimPlay("sc_prisoner_shower_wash_out", false)end,

function(l_18_0)return game.hud:FaderFadeOut(500)end,

function(l_19_0)return ply:SetPhysState(enums.PhysicsState.Disabled)end,

function(l_20_0)return ply:SetPos(Math:newVector(85.935424804688, 892.66986083984, -12.976872444153))end,

function(l_21_0)return game.hud:FaderFadeIn(500)end,

function(l_22_0)return ply:SetAnimStyle("common","ManWinterCrossHands")end,

function(l_23_0)return ply:SetControlStyle(enums.ControlStyle.FREE)end})

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






 








ply=game.game:GetActivePlayer()

DelayBuffer:Insert(function(l_1_0)

CommandBuffer:Insert(l_6_0,{

function(l_1_0)return ply:SetControlStyle(enums.ControlStyle.LOCKED)end,

function(l_2_0)return ply:SetPhysState(enums.PhysicsState.DISABLED)end,

function(l_3_0)return ply:SetPos(Math:newVector(79.203666687012, 894.61267089844, -13.322269439697))end,

function(l_2_0)return ply:AnimPlay("sc_gangster_WC_wash", false)end,

function(l_2_0)return ply:AnimPlay("sc_gangster_WC_wash", false)end,

function(l_2_0)return ply:SetPhysState(enums.PhysicsState.Enabled)end,

function(l_8_0)return ply:SetControlStyle(enums.ControlStyle.FREE)end})

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






 

Some problems about the decompiled LUA codes

Started by WJSZ12 1 voices 0 replies
Last post
10 years, 11 months ago

What We Hope To See In Mafia III

Started by joshua 5 voices 10 replies
Last post
10 years, 11 months ago

New Info FR JA v4.0 & FR M v4.0 are abandoned.

Started by eXistenZ34 7 voices 9 replies
Last post
11 years ago

Improved Suits By Mike Bruski v1.0

Started by Mike Bruski 7 voices 15 replies
Last post
11 years ago

Je suis Charlie

Started by eXistenZ34 3 voices 3 replies
Last post
11 years, 1 month ago

Mafia Voice Actor Teases Mafia 3

Started by joshua 1 voices 0 replies
Last post
11 years, 1 month ago

Mafia III Listed on Play Asia Website

Started by joshua 1 voices 0 replies
Last post
11 years, 2 months ago
Last post
11 years, 2 months ago

"Howdy"

Started by Ron Mathews 2 voices 1 replies
Last post
11 years, 5 months ago

Mafia II : LUA command

Started by eXistenZ34 12 voices 22 replies
Last post
11 years, 5 months ago
Last post
11 years, 5 months ago

Remove Hats

Started by Ron Mathews 2 voices 2 replies
Last post
11 years, 5 months ago

Using Injector

Started by benabelly 4 voices 4 replies
Last post
11 years, 6 months ago
Last post
11 years, 6 months ago

Salieri Underboss Mod

Started by lightingft 7 voices 14 replies
Last post
11 years, 6 months ago
Viewing 15 topics - 106 through 120 (of 1,432 total)