Okay. This has been a gripe of my players for a while. Here's a quick patch that give distance (in meters) and direction (in Cardinal/Inter-cardinal directions i.e. "North", "South-West") relative to the player. An example is "Your corpse was last seen 46 meters North-East of here."
You can download and replace the existing plug-in with the file below.
Please Note: You will have to delete your existing language file at /oxide/lang/en/WheresMyCorpse.json as well as any other Languages you've translated it into. Otherwise it will not display the extra info. I uploaded the plugin, deleted the language file, then reloaded the plugin from rcon.
For those who are curious, there are four changes each is marked with a comment. I haven't changed any of the version/author info as this is a quick patch.
As always, if anyone knows a better way, please share.
Update: A random moderator or admin has deleted the file I uploaded with the fix citing ("No Random Versions"). I would appreciate it, if they would clarify this with a PM. I can find nothing in the Oxide Forum Rules and Terms of Service about this issue and would like to avoid future issues. To allow people to actually use this plug-in, I'll quote the four changes I made:
At start of class (around line 15)
In function Loaded (around line 24)Code:class WheresMyCorpse : RustPlugin { string[] compassRose = new string[] { "South", "South-West", "West", "North-West", "North", "North-East", "East", "South-East", "South" }; //Insert this line. Patch Change #1 void Loaded()
In function OnPlayerRespawned (around Line 85)Code:lang.RegisterMessages(new Dictionary<string,string>{ ["WMC_NoData"] = "No data was found on your last death. The WheresMyCorpse plugin may have been reloaded or you have not died yet.", ["WMC_LastSeen"] = "Your corpse was last seen {0} meters {1} of here.", //Cange this line. Patch Change #2 ["WMC_NoPermission"] = "You do not have permission to use that command." }, this);
In function "TestCommand" (around line 108)Code:float distanceToCorpse = Vector3.Distance(lastDeathPosition,currentPosition); //Start of patch change #3 Add everything between comments. Vector3 dir = (lastDeathPosition - currentPosition).normalized; int dirDeg = Convert.ToInt32(((Mathf.Atan2(dir.x, dir.z) / Mathf.PI) * 4) + 4); SendReply(player, string.Format(GetMessage("WMC_LastSeen", player.UserIDString), distanceToCorpse.ToString("0"), compassRose[dirDeg])); //End of patch change #3 drawArrow(player,60.0f);
Code:float distanceToCorpse = Vector3.Distance(lastDeathPosition,currentPosition); //Start of patch change #4 Add everything between comments. Vector3 dir = (lastDeathPosition - currentPosition).normalized; int dirDeg = Convert.ToInt32(((Mathf.Atan2(dir.x, dir.z) / Mathf.PI) * 4)+4); SendReply(player,string.Format(GetMessage("WMC_LastSeen",player.UserIDString), distanceToCorpse.ToString("0"), compassRose[dirDeg] )); //End of patch change #4 drawArrow(player,30.0f);
WheresMyCorpse
Moved
Total Downloads: 5,493 - First Release: Mar 20, 2016 - Last Update: Apr 6, 2018
- 5/5, 20 likes
-
On every time you might feel to have an improvement for any plugin version, you need to contact the author in a direct way to provide him such code-changes. This way the forums are kept clean from random versions, which does also trim down any discussions on versions, which are not really in sync with the public versions. It's also a simple protection to avoid nasty plugin versions, what also happened a lot in the past. -
As the plug-in has been declared dead, and people were asking for a fix, I saw no harm in posting one. Again, I apologize if this was incorrect. -
I would thank you for the fix event if the method is not appropriate for purpose but it served me to fix the bug Rust.
Is there something similar to do with Pet plugin can work please?
BR
Edit: damn finaly that only work as real admin it seem as default players i not see the cone arrow sad but thx.Last edited by a moderator: Mar 5, 2017 -
Fujikura updated Where's My Corpse? with a new update entry:
0.6.0
-
Help me please. i install plugin. have permission. but when i writ command - i see just can only see the distance and direction of the compass, but no arrows
-
-
Thank Maestro i go try that
by this way then the plugin tittle need to be edit like:
Displays an arrow and distance to corpse after respawn
Br -
Code:
Displays direction and distance to corpse after respawn or on command
-
Workin perfect thank @Fuji
-
WMC_LastSeenDirection
[DOUBLEPOST=1488832442][/DOUBLEPOST]I do not see anything other than the phrase "WMC_LastSeenDirection" -
really? you suggest me where i've the same issue on godmode plugin translated. For you information i have translated this one and it working fine it's weird and will be good if we found where is the problem ... maybe a wrong charset somewhere then?
this work for me:
Code:"WMC_LastSeenDirection": "Ton dernier corps décédé a été vu à <color=yellow>{0}m</color> en direction du <color=yellow>{1}</color>.",
-
I have the same problem on this and others plugins,
I think is an Oxide problem that @Wulf needs to check out.
When you add manualy a .json for a new lang for example Copying /lang/en/whereismycorpse.json to /lang/es/whereismycorpse.json
and make the translation, Save the file, reload the Plugin... the Server comes "crazy" and some translation stop working. That happens me this last week. -
Wulf Community Admin
-
-
Okay !! i found the issue it seem, listen when you update or translate some files are not in same line order than the default english file, that why for my godmode plugin wouldn't translate Wulf I just tested it's ok with Godmode issue i go reply after that although, i try to explain in my sad english.
good oder:
Code:"WMC_NoData": "WMC_LastSeen": "WMC_LastSeenDirection": "WMC_Dir_North": "WMC_Dir_NorthEast": "WMC_Dir_East": "WMC_Dir_SouthEast": "WMC_Dir_South": "WMC_Dir_SouthWest": "WMC_Dir_West": "WMC_Dir_NorthWest":wrong order ^^ "WMC_LastSeenDirection": "WMC_LastSeen": "WMC_NoData": "WMC_Dir_North": "WMC_Dir_NorthEast": "WMC_Dir_East": "WMC_Dir_SouthEast": "WMC_Dir_South": "WMC_Dir_SouthWest": "WMC_Dir_West": "WMC_Dir_NorthWest":
-
Wulf Community Admin
-
Sure you right but other thing happen then
-
Hello it works well by deleting the translations in French but after rebooting the plugin I translate the sentences and then re-launch the plugin but apparently it is not taken into account. thank you in advance
-
i wish there still was a arrow in this mod :/ could someone help me how can i add it?