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); } } }
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.