Loborl submitted a new resource:
Location - Provide player's coordinates on command
Read more about this resource...
Location [Replaced]
Discussion in 'Plugin Support' started by Loborl, Dec 14, 2015.
-
now we just need a map that we can plug the cords into
-
xero-hurtworld.com/map
-
Wulf Community Admin
Congrats on your first plugin @Loborl! I noticed you have a bit of unnecessary code in your plugin though, so I've provided you a simpler example below.
Code:namespace Oxide.Plugins { [Info("Location", "loborl", "1.0")] class Location : HurtworldPlugin { void Init() { cmd.AddChatCommand("loc", this, "PlayerPos"); cmd.AddChatCommand("pos", this, "PlayerPos"); } void PlayerPos(PlayerIdentity identity, uLink.NetworkMessageInfo info) { var entity = identity.WorldPlayerEntity; hurt.SendChatMessage(info.sender, "<color=#ff8000>Position</color>", entity.transform.position.ToString()); } } }
-
-
Wulf Community Admin
@Loborl, I'm seeing a lot of code duplication with each update. You may want to take a look at the suggestions I posted above.
Also, if providing messages, you should be using the Lang API from Oxide (will be required soon). I'd also recommend Oxide's API for sending the messages, and you should also be using the datafile API, not the config API for storing player info. Your version number in your latest update was also not changed, which it should be updated each time a release is made.
Please reply once able. Your plugin has been removed from view for now until I hear back regarding the mentioned changes in this and the post post. -
Hi Wulf,
Thanks for it. First blood.
Sorry for that i didn't see this conversation before.
I appreciate any advice if you found something feel free to write me.
I edit my last update i just need to update it again with correct content.
Reqards,
Loborl,
Have a nice rest of day -
Wulf Community Admin
-
-
Wulf Community Admin
Also, hurt.SendChatMessage (example in my first reply) available with the same functionality as using it directly, without the excess code and reference. -
Little spam
Right now i look onto it.
Fix is on the way
Thanks Again
Reqars,
Loborl -
when I do /posall I see nothing special?
-
Hi Bouke Jan
look at HurtworldDedicatedServer\oxide\config\Location.Json
You can find all players and his location, in short future i have plan to connect this with MySQL or any other DataStore and after that you can do online map or anything else and anywhere you want.
Reqards,
loborl -
-
I really love your plugin, seeing forward to get the sql support =D
-
Please update it.
-
Wulf Community Admin
-
9:29 AM [Error] Location plugin failed to compile!
9:29 AM [Error] Location.cs(58,29): error CS1061: Type `PlayerIdentity' does not contain a definition for `WorldPlayerEntity' and no extension method `WorldPlayerEntity' of type `PlayerIdentity' could be found. Are you missing an assembly reference?
I got the error....what problem?...Should I change source code? -
I am not sure why, but this plugin does not work for me .. it just keeps saying unknown command.
Just like Gunbyul - The log file says: "11:02 PM [Error] Error while compiling Location.cs(58,29): error CS1061: Type `PlayerIdentity' does not contain a definition for `WorldPlayerEntity' and no extension method `WorldPlayerEntity' of type `PlayerIdentity' could be found. Are you missing an assembly reference?" -
Wulf Community Admin