Jump to content

SET_PLAYER_MODEL


Native Details

  • NameSET_PLAYER_MODEL
  • NamespacePLAYER
  • Native Hash0xED40380076A31506
  • Typeint
  • First seen version1207

Native Parameters

DESCRIPTION

Example command for this function:
 

// Exemple in C# by Hayden Almeida (DISCORD: Hayden Almeida#7075)
// Client File
using static Arq.Funcoes;
public Main()
{
	API.RegisterCommand("setplayermodel", new Action<int, List<object>, string>((src, argumentos, raw) =>
    {
    	CMD_SetPlayerModel(argumentos);
    }), false);
}
private void CMD_SetPlayerModel(List<object> argumentos)
{
  	pedid = API.GetPlayerPed(playerid);
  	playerid = API.PlayerPedId();
  	var argList = argumentos.Select(o => o.ToString()).ToList();
  	if (argList.Any() && Enum.TryParse(argList[0], true, out PedHash pedi))
  	{                
  		VirarPed(pedi, pedid,playerid);
  	}
}

// In another Class
namespace Arq
{
    class Funcoes
    {
      public async static void VirarPed(PedHash ped, int pedid, int playerid)
      {
        if (!await LoadModel((int)ped)) //if (!await LoadModel(Convert.ToInt32(ped)))
        {
          return;
        }
        Function.Call(Hash.SET_PLAYER_MODEL, pedid, ped, false);
        playerid = API.PlayerPedId();
        SetRandomOutfitVariation(playerid);
      }
    }
}

 



User Feedback

Recommended Comments

There are no comments to display.



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Red Dead Redemption 2 Native Database by www.mod-rdr.com, includes contributions by gudmunduro and alloc8or.

  • Recently Browsing   0 members

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