Everything posted by DMes71
-
Check how Ped died
Yes, something like this is exactly what I'm looking for. That should work. Thanks for the help!
-
Check how Ped died
I'm trying to think of a way to tell how a Ped died, specifically if it was a gun or a melee weapon. Does anybody have any ideas? While trying to get some ideas, I used my character to kill a player and checked if the LocalPlayer.Character.Inventory.EquippedWeapon == "WEAPON_UNARMED", but that didn't seem to work. Any ideas help, Thank you!
-
Looking for a way to find a random safe place for a ped to spawn
I'm trying to find a way to make ped spawn at a random position within a certain radius from a given point. I've tried using the native GET_SAFE_COORDS_FOR_PED but i have not been able to successfully implement it. is there a simpler function in rage to do this or am I stuck using this native or a similar one?
-
Supporting Xbox Controller in plugin?
Thanks for the reply. It's in a loop the code looks something like this: while (true) { if (Game.IsKeyDown(Keys.E) || Game.IsControllerButtonDown(Rage.ControllerButtons.A)) { if (((Ped)GetAimedEntity()).Exists() && ((Ped)GetAimedEntity()).IsValid() && (((Ped)GetAimedEntity()).DistanceTo(Game.LocalPlayer.Character.GetOffsetPosition(Vector3.RelativeFront * 0f))) <= 5f) {} } I know the loop is working because the if statement passes if I press E.
-
Supporting Xbox Controller in plugin?
I'll have to keep messing with it, but it doesn't seem to work. I can't ever get IsControllerButtonDown() to return as true when I'm holding a button down.
-
Supporting Xbox Controller in plugin?
Don't know how I missed that lol. Thanks for pointing that out, that should do the trick.
-
Supporting Xbox Controller in plugin?
Does anybody know how to do this? I'm looking to start with just being able to read input from a controller. Are there any examples anywhere to follow? Is this supported with rage alone or do I need more references? Any push in the right direction is appreciated.
-
Deriving class frrom Ped
Thanks for the help everyone. I'm going to try out a couple methods and see which one I like better. I looked at that example and it helped with inheritance a lot but it only showed spawning new peds of the MyPed type instead of working with what is already there. I like this idea but would it may it incompatible with any plugin that also wanted to change the default Ped type?
-
Deriving class frrom Ped
I need to do something that seems like it should be simple but I'm having a tough time doing it. The end goal is to attach some properties to a Ped, for example a string that contains what is in the ped's pocket. So say, a ped was searched for the first time so I generate a string of what is in that ped's pocket and somehow save it to that ped so that if we searched the same ped again, you would get the same string. The way I have been trying to do this is by creating a class that inherits the Ped class and adding the properties to this class. The problem is if I search a ped on the street they aren't the class I created, they are a normal Ped class, so they don't have this property. This is where I'm stuck. Is it possible to clone this Ped as an object of my derived class? Or is there a simply way entirely to keep track of properties that are specific to a pedestrian? Thanks for any help. I'm not too familiar with Rage yet.
-
Trying to find a way check if Ped is Stopped
Thanks for the help. I wasn't sure if it was a specific state the peds were in or just stopped.
-
Trying to find a way check if Ped is Stopped
I'm trying to find a way to check if a ped is stopped on foot from pressing and holding E. I can't seem to find a function for it in the API or anywhere. Does anybody know of a way to do this?