-
Posts
9 -
Joined
-
Last visited
-
Days Won
1
Hayden Almeida last won the day on January 21 2021
Hayden Almeida had the most liked content!
Personal Information
-
Country
Brazil
-
Gender
Male
Hayden Almeida's Achievements
Feller (1/10)
2
Reputation
-
Hayden Almeida made an edit on SET_LADDER_SPEED in RDR2 Native Database
-
Hayden Almeida made an edit on p2 in RDR2 Native Parameters
-
Hayden Almeida made an edit on p1 in RDR2 Native Parameters
-
Hayden Almeida made an edit on propset in RDR2 Native Parameters
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_VEHICLE_PROPSET in RDR2 Native Database
-
Hayden Almeida made an edit on blip in RDR2 Native Parameters
-
Hayden Almeida made an edit on TRACK_BLIP_GPS in RDR2 Native Database
-
Hayden Almeida made an edit on _TASK_EMOTE in RDR2 Native Database
-
Hayden Almeida made an edit on SET_WEATHER_TYPE in RDR2 Native Database
-
Hayden Almeida made an edit on p5 in RDR2 Native Parameters
-
Hayden Almeida made an edit on p2 in RDR2 Native Parameters
-
Hayden Almeida made an edit on p1 in RDR2 Native Parameters
-
Hayden Almeida made an edit on Spawning your ped (C#) in RDR Modding Tutorials
-
Hayden Almeida made an edit on Spawning your ped (C#) in RDR Modding Tutorials
-
Hayden Almeida started following Spawning your ped (C#)
-
Today i will try to teach how to spawn your first ped in RedM with C#. first you need to create a "ENUM" to make your list of your peds (you can see they here: https://www.mod-rdr.com/wiki/peds/ ) public enum PedHash : uint { AcHorseAndalusianDarkbay = 0xE57FC660, AcHorseAndalusianRosegray = 0x2C80A080 } ATENTION! If you are using other Class to create this enum, you put "public enum". If this enum was created in the same class, you use "private enum". Second lets create our function to spawn and load the ped: public static async Task<bool> LoadModel(int hash) { if (Function.Call<bool>(Hash.IS_MODEL_VALID, hash)) { Function.Call((Hash)0xFA28FE3A6246FC30, hash); while (!Function.Call<bool>(Hash.HAS_MODEL_LOADED, hash)) { Debug.WriteLine($"Esperando o modelo {hash} carregar!"); await BaseScript.Delay(200); } Debug.WriteLine("Modelo carregado!"); return true; } else { Debug.WriteLine($"Model {hash} nao e valido!"); return false; } } public static async Task<bool> LoadPed(PedHash ped) { if (!await LoadModel((int)ped)) return true; else return false; } This function ^ will load the ped. Before creating the main function to spawn the ped, we need to create other function to "randomize" the outfit of the ped. Without this the ped will not spawn! So i only created in a "beautiful" name 😄 public static void SetRandomOutfitVariation(int ped) { Function.Call((Hash)0x283978A15512B2FE, ped, true); } Now lets create the main function to spawn de ped: public static async Task<int> CriarPed(PedHash ped, float posx, float posy, float posz, float heading) { var task = LoadPed(ped); // this will call the function we already created before bool result = await task; // this line will only proceed if we have something in return from "LoadPed" int ped_ = API.CreatePed((uint)ped, posx, posy, posz, heading, true, true, true, true); Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, ped_, true, true); // setting this true for this ped not "despawn" SetRandomOutfitVariation(ped_); // every ped to spawn we need to random his outfit or variation... API.SetModelAsNoLongerNeeded((uint)ped); // clear the model in memory return ped_; } Now with our functions created, we can now create our command to spawn any ped that are inside ENUM. The command will work this way: /createped [ped name] Lets go to our main CLIENT file, inside our Main public: public Main() { API.RegisterCommand("createped", new Action<int, List<object>, string>((src, argumentos, raw) => { CMD_CriarPed(argumentos); // this is the function we will excute }), false); } This is the function our command will execute: private async void CMD_CriarPed(List<object> argumentos) { playerid = API.PlayerPedId(); var argList = argumentos.Select(o => o.ToString()).ToList(); if (argList.Any() && Enum.TryParse(argList[0], true, out PedHash pedi)) // this line will compare if the param we write, exists inside ENUM. { // argList[0] is to get the first argumento we wrote. // TIP: // if we want another parameter for our command we can call this: // int number = Convert.ToInt32(argumentos[1]); // Now our command can use: /createped [ped name] [number] // and so on... Vector3 pos = API.GetEntityCoords(playerid, false, false); Vector3 forwardpos = API.GetEntityForwardVector((uint)playerid); float hdg = API.GetEntityHeading(playerid); pos += (forwardpos * 5); var ped_criado = CriarPed(pedi, pos.X, pos.Y, pos.Z + 2.0F, hdg); int result = await ped_criado; Debug.WriteLine($"Ped ID created={result}"); } } Hope this will help begginers to program in RedM! Cya 🧲
-
Hayden Almeida made an edit on CREATE_BLOOD_POOL_AT_PED in RDR2 Native Database
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on hash in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_MODEL_A_HORSE in RDR2 Native Database
-
Hayden Almeida made an edit on TASK_FOLLOW_TO_OFFSET_OF_ENTITY in RDR2 Native Database
-
Hayden Almeida made an edit on AGITATE_HORSE in RDR2 Native Database
-
Hayden Almeida made an edit on ACTIVATE_PROPSET_ON_VEHICLE_2 in RDR2 Native Database
-
Hayden Almeida made an edit on propSet in RDR2 Native Parameters
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_VEHICLE_TINT in RDR2 Native Database
-
Hayden Almeida made an edit on SET_VEHICLE_TINT in RDR2 Native Database
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on REMOVE_ALL_PED_AMMO in RDR2 Native Database
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on REMOVE_VEHICLE_PROPSETS in RDR2 Native Database
-
Hayden Almeida made an edit on SET_PED_MOOD_* in RDR2 Native Database
-
Hayden Almeida made an edit on target in RDR2 Native Parameters
-
Hayden Almeida made an edit on moodIndex in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_PED_MOOD_* in RDR2 Native Database
-
Hayden Almeida made an edit on GET_PED_MOOD_TOWARDS_PED in RDR2 Native Database
-
Hayden Almeida made an edit on target in RDR2 Native Parameters
-
Hayden Almeida made an edit on moodIndex in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_PED_MOOD_TOWARDS_PED in RDR2 Native Database
-
Hayden Almeida made an edit on target in RDR2 Native Parameters
-
Hayden Almeida made an edit on value in RDR2 Native Parameters
-
Hayden Almeida made an edit on moodIndex in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_PED_MOOD_TOWARDS_PED in RDR2 Native Database
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_PED_FALLING_2 in RDR2 Native Database
-
Hayden Almeida made an edit on style in RDR2 Native Parameters
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_VEHICLE_TINT in RDR2 Native Database
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_VEHICLE_TINT in RDR2 Native Database
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_PED_ID_RANGE in RDR2 Native Database
-
Hayden Almeida made an edit on visible in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_PED_ALL_WEAPONS_VISIBILITY in RDR2 Native Database
-
Hayden Almeida made an edit on wetLevel in RDR2 Native Parameters
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_VEHICLE_WETNESS in RDR2 Native Database
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_SEAT_PED_IS_IN in RDR2 Native Database
-
Hayden Almeida made an edit on modifier in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_DEFENSE_MODIFIER_FOR_PED in RDR2 Native Database
-
Hayden Almeida made an edit on meleeDefenseMod in RDR2 Native Parameters
-
Hayden Almeida made an edit on weaponDefenseMod in RDR2 Native Parameters
-
Hayden Almeida made an edit on player in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_PLAYER_DEFENSE_MODIFIER in RDR2 Native Database
-
Hayden Almeida made an edit on _0xE296208C273BD7F0 in RDR2 Native Database
-
Hayden Almeida made an edit on _REQUEST_PHOTO_MODE_DEFREEZE in RDR2 Native Database
-
Hayden Almeida made an edit on _REQUEST_PHOTO_MODE_FREEZE in RDR2 Native Database
-
Hayden Almeida made an edit on _0x2703EFB583F0949A in RDR2 Native Database
-
Hayden Almeida made an edit on _0x2703EFB583F0949A in RDR2 Native Database
-
Hayden Almeida made an edit on voice in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on HIDE_HUD_THIS_FRAME in RDR2 Native Database
-
Hayden Almeida made an edit on lightPropset in RDR2 Native Parameters
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on ADD_LIGHT_PROPSET_TO_VEHICLE in RDR2 Native Database
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on DOES_VEHICLE_HAVE_ANY_PROPSET in RDR2 Native Database
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_VEHICLE_PROPSET in RDR2 Native Database
-
Hayden Almeida made an edit on entity in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_ENTITY_FROZEN in RDR2 Native Database
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on DOES_VEHICLE_HAVE_ANY_LIGHT_PROPSET in RDR2 Native Database
-
Hayden Almeida made an edit on target in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on REMOVE_TARGET in RDR2 Native Database
-
Hayden Almeida made an edit on target in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_TARGET in RDR2 Native Database
-
Hayden Almeida made an edit on GET_PED_LAST_HAT in RDR2 Native Database
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on snowLevel in RDR2 Native Parameters
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_VEHICLE_SNOW_LEVEL in RDR2 Native Database
-
Hayden Almeida made an edit on lodLevel in RDR2 Native Parameters
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_VEHICLE_LOD_LEVEL in RDR2 Native Database
-
Hayden Almeida made an edit on unk in RDR2 Native Parameters
-
Hayden Almeida made an edit on zoomHash in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_RADAR_* in RDR2 Native Database
-
Hayden Almeida made an edit on appName in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_APP_RUNNING_BY_NAME in RDR2 Native Database
-
Hayden Almeida made an edit on unk2 in RDR2 Native Parameters
-
Hayden Almeida made an edit on unk1 in RDR2 Native Parameters
-
Hayden Almeida made an edit on object in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_OBJECT_TARGETTABLE_ in RDR2 Native Database
-
Hayden Almeida made an edit on player in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_PLAYER_FREE_FOCUSING in RDR2 Native Database
-
Hayden Almeida made an edit on audioRef in RDR2 Native Parameters
-
Hayden Almeida made an edit on audioName in RDR2 Native Parameters
-
Hayden Almeida made an edit on STOP_SOUND_WITH_NAME in RDR2 Native Database
-
Hayden Almeida made an edit on SET_TRAIN_ in RDR2 Native Database
-
Hayden Almeida made an edit on train in RDR2 Native Parameters
-
Hayden Almeida made an edit on train in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_TRAIN in RDR2 Native Database
-
Hayden Almeida made an edit on propSet in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_PROPSET_MODEL in RDR2 Native Database
-
Hayden Almeida made an edit on IS_PROPSET_VISIBLE in RDR2 Native Database
-
Hayden Almeida made an edit on propSet in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_PROPSET_VISIBLE in RDR2 Native Database
-
Hayden Almeida made an edit on toggle in RDR2 Native Parameters
-
Hayden Almeida made an edit on propSet in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_PROPSET_VISIBLE in RDR2 Native Database
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_PED_VEHICLE_CARRIAGE in RDR2 Native Database
-
Hayden Almeida made an edit on START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE_2 in RDR2 Native Database
-
Hayden Almeida made an edit on scale in RDR2 Native Parameters
-
Hayden Almeida made an edit on boneIndex in RDR2 Native Parameters
-
Hayden Almeida made an edit on rotZ in RDR2 Native Parameters
-
Hayden Almeida made an edit on rotY in RDR2 Native Parameters
-
Hayden Almeida made an edit on rotX in RDR2 Native Parameters
-
Hayden Almeida made an edit on offsetZ in RDR2 Native Parameters
-
Hayden Almeida made an edit on offsetY in RDR2 Native Parameters
-
Hayden Almeida made an edit on offsetX in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on effectName in RDR2 Native Parameters
-
Hayden Almeida made an edit on START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE_2 in RDR2 Native Database
-
Hayden Almeida made an edit on vehicle in RDR2 Native Parameters
-
Hayden Almeida made an edit on GET_CURRENT_VEHICLE_DRIVER in RDR2 Native Database
-
Hayden Almeida made an edit on TASK_WALK_AWAY in RDR2 Native Database
-
Hayden Almeida made an edit on run from in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_HORSE_TAG in RDR2 Native Database
-
Hayden Almeida made an edit on SET_HORSE_TAG in RDR2 Native Database
-
Hayden Almeida made an edit on name in RDR2 Native Parameters
-
Hayden Almeida made an edit on horse in RDR2 Native Parameters
-
Hayden Almeida made an edit on _SET_PED_PROMPT_NAME in RDR2 Native Database
-
Hayden Almeida made an edit on player in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_PED_STAMINA in RDR2 Native Database
-
Hayden Almeida made an edit on value in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
public static void RemovePedWeapon(int pedid, WeaponHash weapon) { Function.Call(Hash.REMOVE_WEAPON_FROM_PED, pedid, weapon, true); // USE: RemovePedWeapon(playerid, WeaponHash.Bow); } 🧲
-
Example in C#: public static void GivePlayerWeapon(int playerid, WeaponHash weapon, int ammo) { if(Function.Call<bool>((Hash)0x8DECB02F88F428BC, playerid, (uint)weapon, 0, true)) // Has ped Got Weapon API.SetPedAmmo(playerid, (uint)weapon, ammo); // will give only ammo else Function.Call((Hash)0x5E3BDDBCB83F3D84, playerid, (uint)weapon, ammo, false, true, 1, false, 0.5F, 1.0F, false, 0); }
-
public static bool HasPedGotWeapon(int ped, WeaponHash weapon) { return Function.Call<bool>((Hash)0x8DECB02F88F428BC, ped, (uint)weapon, 0, true); } 🧲
-
Hayden Almeida made an edit on p3 in RDR2 Native Parameters
-
Hayden Almeida made an edit on unused in RDR2 Native Parameters
-
Hayden Almeida made an edit on _SET_PED_DEFAULT_OUTFIT in RDR2 Native Database
-
Hayden Almeida made an edit on p1 in RDR2 Native Parameters
-
Example in C#: public static uint GetCurrentPedWeapon(int ped) { // Retorna um numero decimal da arma que o ped está na mão. // Returns a decimal number of the weapon the ped is in hand. uint weapon = 0; API.GetCurrentPedWeapon(ped, ref weapon, false, 0, false); return weapon; }
-
Hayden Almeida made an edit on SET_PED_TO_RAGDOLL in RDR2 Native Database
-
Hayden Almeida made an edit on p6 in RDR2 Native Parameters
-
Hayden Almeida made an edit on p5 in RDR2 Native Parameters
-
Hayden Almeida made an edit on p4 in RDR2 Native Parameters
-
Hayden Almeida made an edit on TASK_LEAD_HORSE in RDR2 Native Database
-
Hayden Almeida made an edit on horse in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on speed in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped in RDR2 Native Parameters
-
Hayden Almeida made an edit on SET_LADDER_SPEED in RDR2 Native Database
-
Hayden Almeida started following TASK_PLAY_ANIM and IS_CONTROL_JUST_PRESSED
-
Example in C#: 🙂 // ENTER button on keyboard if (API.IsControlJustReleased(0, 0x2CD5343E)) { // Do something } Some links: https://github.com/summeryukata/redm-simple-trainer/blob/master/Native/Controls.cs#L106 https://github.com/femga/rdr3_discoveries/tree/master/Controls https://pastebin.com/WA2mfvA0
-
Hayden Almeida made an edit on DRAW_SPRITE in RDR2 Native Database
-
Example Use in C#: public static async void PlayClipset(string dict, string anim, int flag, int duration = -1) { // PlayClipset("mech_loco_m@generic@reaction@handsup@unarmed@tough", "loop", 31); // https://rdr2.mooshe.tv/animations/ API.RequestAnimDict(dict); while (!API.HasAnimDictLoaded(dict)) { await BaseScript.Delay(100); } if (API.IsEntityPlayingAnim(API.PlayerPedId(), dict, anim, 3)) API.ClearPedSecondaryTask(API.PlayerPedId()); else Function.Call(Hash.TASK_PLAY_ANIM, API.PlayerPedId(), dict, anim, 1.0f, 8.0f, duration, flag, 0, true, 0, false, 0, false); }
-
Hayden Almeida made an edit on SET_TEXT_SCALE in RDR2 Native Database
-
How to stop scenario correctly? Some scenarios create a prop. How to delete this prop?
-
Hayden Almeida made an edit on ADD_ATTRIBUTE_POINTS in RDR2 Native Database
-
Hayden Almeida made an edit on ComponentCATEGORY in RDR2 Native Parameters
-
Hayden Almeida made an edit on _IS_PED_COMPONENT_EQUIPPED in RDR2 Native Database
-
Hayden Almeida made an edit on ComponentCATEGORY in RDR2 Native Parameters
-
Hayden Almeida made an edit on ped id in RDR2 Native Parameters
-
Hayden Almeida made an edit on IS_ANY_PED_NEAR_POINT in RDR2 Native Database
-
Hayden Almeida made an edit on DRAW_SPRITE in RDR2 Native Database
-
Hayden Almeida made an edit on IS_PED_JUMPING in RDR2 Native Database
-
Hayden Almeida made an edit on SET_PLAYER_MODEL in RDR2 Native Database
-
Hayden Almeida made an edit on SET_WEATHER_TYPE in RDR2 Native Database
-
Hayden Almeida changed their profile photo
-
Hayden Almeida made an edit on Freeze time in RDR2 Native Parameters
-
Hayden Almeida made an edit on transitionTime (in ms) in RDR2 Native Parameters
-
Hayden Almeida made an edit on NETWORK_OVERRIDE_CLOCK_TIME in RDR2 Native Database
-
Hayden Almeida joined the community
-
This function already have in the API: API.NetworkClockTimeOverride(int ,int,int, int, bool); Example use: API.NetworkClockTimeOverride(int hour ,int minute,int second, int ms transition time, bool FreezeTime); API.NetworkClockTimeOverride(14,30,0, 10000, false); // This will set the time to 2:30 PM and the transition will occur in 10 seconds and the time will not freeze