Jump to content

[HELP]Animation


#[B]lack

Recommended Posts

tabelanimacao = {

	ifp = {},
	
	animacoes = {	
		"GunMove_BWD",
		"GunMove_FWD",	
        "GunMove_L",
		"GunMove_R",
		"GunCrouchBwd",
		"GunCrouchFwd",
		"IDLE_armed",
		"JOG_maleA",
		"run_armed",
		"Run_stop",
		"run_player",
		"run_right",
		"run_left",
		"run_old",
		"run_civi",
		"ARRESTgun",
		"Crouch_Roll_L",
		"Crouch_Roll_R",
		"getup",
		"SEAT_down",
		"SEAT_up",
		"SEAT_idle",
		"getup_front",
		"GUN_BUTT",
		"GUN_BUTT_crouch",
		"GUN_2_IDLE",
		"Gun_stand",
		"HitA_1",
		"HitA_2",
		"HitA_3",
		"HIT_back",
		"HIT_behind",
		"HIT_front",
		"HIT_GUN_BUTT",
		"HIT_L",
		"HIT_R",
		"HIT_walk",
		"HIT_wall",
		"IDLE_chat",
		"IDLE_csaw",
		"Idle_Gang1",
		"IDLE_HBHB",
		"IDLE_ROCKET",
		"IDLE_stance",
		"IDLE_taxi",
		"IDLE_tired",
		"CLIMB_idle",
		"CLIMB_jump",
		"CLIMB_jump2fall",
		"CLIMB_jump_B",
		"CLIMB_Pull",
		"CLIMB_Stand",
		"Climb_Stand_Finish",
		"JUMP_glide",
		"JUMP_land",
		"JUMP_launch",
		"JUMP_launch_R",
		"KD_left",
		"KD_right",
		"KO_shot_face",
		"KO_shot_front",
		"KO_shot_stom",
		"KO_skid_back",
		"KO_skid_front",
		"KO_spin_L",
		"KO_spin_R",
		"phone_in",
		"phone_out",
		"phone_talk",
		"Player_Sneak",
		"Player_Sneak_walkstart",
		"WALK_armed",
		"WALK_civi",
		"WALK_csaw",
		"Walk_DoowPartial",
		"WALK_drunk",
		"WALK_fat",
		"WALK_fatold",
		"WALK_gang1",
		"WALK_gang2",
		"WALK_old",
		"WALK_player",
		"WALK_rocket",
		"WALK_shuffle",
		"WALK_start",
		"WALK_start_armed",
		"WALK_start_csaw",
		"WALK_start_rocket",
		"Walk_Wuzi",
		"WEAPON_crouch",
		"FALL_collapse",
		"FALL_back",
		"FALL_fall",
		"FALL_front",
		"FALL_glide",
		"FALL_land",
		"FALL_skyDive",
		"gum_eat",
		"DAM_armL_frmBK",
		"DAM_armL_frmFT",
		"DAM_armL_frmLT",
		"DAM_armR_frmBK",
		"DAM_armR_frmFT",
		"DAM_armR_frmRT",
		"DAM_LegL_frmBK",
		"DAM_LegL_frmFT",
		"DAM_LegL_frmLT",
		"DAM_LegR_frmBK",
		"DAM_LegR_frmFT",
		"DAM_LegR_frmLT",
		"EV_dive",
		"EV_step",
		"endchat_01",
		"endchat_02",
		"endchat_03"
	}

}


addEventHandler("onClientResourceStart", resourceRoot,
	function()

		tabelanimacao.ifp["block"] = "ped"
		tabelanimacao.ifp["ifp"] = engineLoadIFP("ped.ifp", tabelanimacao.ifp["block"])

		for _, v in ipairs(tabelanimacao.animacoes) do
			engineReplaceAnimation(getLocalPlayer(), "ped", v, tabelanimacao.ifp["block"], v)
		end

	end
)

how i do for is animation appear for all players? That mode appear only for your player!

Link to comment

try this, i just changed getLocalPlayer() to getRootElement()

tabelanimacao = {

	ifp = {},
	
	animacoes = {	
		"GunMove_BWD",
		"GunMove_FWD",	
        "GunMove_L",
		"GunMove_R",
		"GunCrouchBwd",
		"GunCrouchFwd",
		"IDLE_armed",
		"JOG_maleA",
		"run_armed",
		"Run_stop",
		"run_player",
		"run_right",
		"run_left",
		"run_old",
		"run_civi",
		"ARRESTgun",
		"Crouch_Roll_L",
		"Crouch_Roll_R",
		"getup",
		"SEAT_down",
		"SEAT_up",
		"SEAT_idle",
		"getup_front",
		"GUN_BUTT",
		"GUN_BUTT_crouch",
		"GUN_2_IDLE",
		"Gun_stand",
		"HitA_1",
		"HitA_2",
		"HitA_3",
		"HIT_back",
		"HIT_behind",
		"HIT_front",
		"HIT_GUN_BUTT",
		"HIT_L",
		"HIT_R",
		"HIT_walk",
		"HIT_wall",
		"IDLE_chat",
		"IDLE_csaw",
		"Idle_Gang1",
		"IDLE_HBHB",
		"IDLE_ROCKET",
		"IDLE_stance",
		"IDLE_taxi",
		"IDLE_tired",
		"CLIMB_idle",
		"CLIMB_jump",
		"CLIMB_jump2fall",
		"CLIMB_jump_B",
		"CLIMB_Pull",
		"CLIMB_Stand",
		"Climb_Stand_Finish",
		"JUMP_glide",
		"JUMP_land",
		"JUMP_launch",
		"JUMP_launch_R",
		"KD_left",
		"KD_right",
		"KO_shot_face",
		"KO_shot_front",
		"KO_shot_stom",
		"KO_skid_back",
		"KO_skid_front",
		"KO_spin_L",
		"KO_spin_R",
		"phone_in",
		"phone_out",
		"phone_talk",
		"Player_Sneak",
		"Player_Sneak_walkstart",
		"WALK_armed",
		"WALK_civi",
		"WALK_csaw",
		"Walk_DoowPartial",
		"WALK_drunk",
		"WALK_fat",
		"WALK_fatold",
		"WALK_gang1",
		"WALK_gang2",
		"WALK_old",
		"WALK_player",
		"WALK_rocket",
		"WALK_shuffle",
		"WALK_start",
		"WALK_start_armed",
		"WALK_start_csaw",
		"WALK_start_rocket",
		"Walk_Wuzi",
		"WEAPON_crouch",
		"FALL_collapse",
		"FALL_back",
		"FALL_fall",
		"FALL_front",
		"FALL_glide",
		"FALL_land",
		"FALL_skyDive",
		"gum_eat",
		"DAM_armL_frmBK",
		"DAM_armL_frmFT",
		"DAM_armL_frmLT",
		"DAM_armR_frmBK",
		"DAM_armR_frmFT",
		"DAM_armR_frmRT",
		"DAM_LegL_frmBK",
		"DAM_LegL_frmFT",
		"DAM_LegL_frmLT",
		"DAM_LegR_frmBK",
		"DAM_LegR_frmFT",
		"DAM_LegR_frmLT",
		"EV_dive",
		"EV_step",
		"endchat_01",
		"endchat_02",
		"endchat_03"
	}

}


addEventHandler("onClientResourceStart", resourceRoot,
	function()

		tabelanimacao.ifp["block"] = "ped"
		tabelanimacao.ifp["ifp"] = engineLoadIFP("ped.ifp", tabelanimacao.ifp["block"])

		for _, v in ipairs(tabelanimacao.animacoes) do
			engineReplaceAnimation(getRootElement(), "ped", v, tabelanimacao.ifp["block"], v)
		end

	end
)

 

Link to comment

You need to loop through all players and apply the animation to each player

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        tabelanimacao.ifp["block"] = "ped"
        tabelanimacao.ifp["ifp"] = engineLoadIFP("ped.ifp", tabelanimacao.ifp["block"])
        for _,player in pairs(getElementsByType'player') do
            for _, v in ipairs(tabelanimacao.animacoes) do
                engineReplaceAnimation(player, "ped", v, tabelanimacao.ifp["block"], v)
            end
        end
    end
)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...