bogoslovniy Posted July 18, 2020 Posted July 18, 2020 I use function RAGE.Game.Shapetest.GetShapeTestResult() [c#]. How do I convert the result(int) to an object(Entity or something)?
LightScr Posted July 18, 2020 Posted July 18, 2020 (edited) Maybe there is better solution, but I would do that something like this // check for type int entityType = RAGE.Game.Entity.GetEntityType(entity); // then depending on type get element Vehicle theVehicle = RAGE.Elements.Entities.Vehicles.GetAtHandle(entity); Player thePlayer = RAGE.Elements.Entities.Players.GetAtHandle(entity); MapObject theObject = RAGE.Elements.Entities.Objects.GetAtHandle(entity); Edited July 18, 2020 by LightScr
bogoslovniy Posted July 18, 2020 Author Posted July 18, 2020 4 часа назад, LightScr сказал: Maybe there is better solution, but I would do that something like this // check for type int entityType = RAGE.Game.Entity.GetEntityType(entity); // then depending on type get element Vehicle theVehicle = RAGE.Elements.Entities.Vehicles.GetAtHandle(entity); Player thePlayer = RAGE.Elements.Entities.Players.GetAtHandle(entity); MapObject theObject = RAGE.Elements.Entities.Objects.GetAtHandle(entity); thank you, man
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now