Hello
the date the file has this structure
how to sort by points the list of names and display them in the chat for the first 5 names?Code:{ "7656139123123123": { "name": lola, "points": 5 } "765611212312312986": { "name": begun, "points": 23 } "76561337923434432": { "name": ProInsa, "points": 11 } }
1. begun
2. ProInsa
3. lola
I started and stood in a deadlock
Code:var data = Interface.GetMod().DataFileSystem.GetDatafile("qw");[ChatCommand("qw")] private void qw(BasePlayer player, string command, string[] args) { int n = 0; sb.append(n+1).append("name") }
Sorting output data?
Discussion in 'Rust Development' started by Solomius™, Mar 24, 2016.
-
not to create another topic, I ask here
how do I display a message in chat that could see all players? -
Wulf Community Admin
For the data sorting, it generally defaults to sorting A-z based on the primary keys. I think you can specify other options, but I'm unsure how.
PrintToChat("Message");Last edited: Mar 29, 2016 -
thank you. And if there is the same as sleep or wait?
I need to do the delay -
Wulf Community Admin
Add a timer before it if you need to delay it. -
how to stop timer? and is it possible to send the server into reboot
Last edited by a moderator: Mar 25, 2016 -
Wulf Community Admin
var timer = create your timer here
timer.Destroy()
To reboot the server, just send the command to reboot it. -
you should be given a medal for helping me
but I do not understand about the restart. what command I need to send from the plugin and where? -
I am suffering for 2 days, but was unable to display in chat even name
can anyone help? -
Wulf Community Admin
Code:rust.RunServerCommand("restart");Code:[ChatCommand("qw")] void CmdQW(BasePlayer player, string command, string[] args) { SendReply(player, $"Your name is {player.displayName}"); PrintToChat(${player.displayName} used the qw chat command"); }
