Skip to content

TimothyDexter/FiveM-CopAnimations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

You will need to create server methods to call the various arrest animations so that they are network sync'd.

Cuff Preview

Frisk Preview

e.g. Client private static async void HandleToggleCuffsWithAnimation( string data ) { var model = JsonConvert.DeserializeObject<StandingArmCuffScene.SceneModel>( data );

		if( Game.PlayerPed.Weapons.Current != WeaponHash.Unarmed ) {
			Function.Call( Hash.SET_CURRENT_PED_WEAPON, Cache.PlayerHandle, WeaponHash.Unarmed, true );
			API.SetPlayerForcedAim( Cache.PlayerHandle, false );
			await BaseScript.Delay( 50 );
		}

		var arrestScene = new StandingArmCuffScene();
		await arrestScene.PlayClientPerpScene( model );

		PlayerCuffState = CuffState.Cuffed;
		Function.Call( Hash.DECOR_SET_INT, Cache.PlayerHandle, "Arrest.CuffState", (int)CuffState.Cuffed);
	}

Server

	public static void ToggleCuffWithAnimation( [FromSource] Player source, int targetPlayer, string data ) {
		Player target = new PlayerList()[targetPlayer];
		
		TriggerClientEvent( target, "Arrest.ToggleCuffsWithAnimation", data );
	}

About

Cop Animations for FiveM

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages