Ooook, so - here is the strange question.
I have a covalence plugin and I need to get console as IPlayer after the command being executed from the game chat.
Is it even possible?
While executing comands from the console IPlayer id seems to be "server_console", but attempts to get the player by this id will fail, at least as I can see....
[DOUBLEPOST=1505262608][/DOUBLEPOST]The only way I see now - is to store the console after some commands being executed from there.... Gonna test it out and see if it'll work.
[DOUBLEPOST=1505262774][/DOUBLEPOST]Yep. Seems working. But is there any better solution? Console Iplayer are not in players.All....
Solved Getting server console IPlayer?
Discussion in 'Rust Development' started by Vlad-00003, Sep 13, 2017.
-
Wulf Community Admin
The console is not a real player, it's purely there for command support. You can identify it when a command is run from the IPlayer.Id or IPlayer.Name for right now, but there are plans to add IPlayer.IsServer. The IPlayer that you get after the command is executed is the actual player though, but you won't be able to look it up manually.
-
P.S. @Wulf, mind a personal question? Do you even sleep?)
Also - would you be so kind and update this plugin - EnchantTools for Rust | Oxide
I've fixed the issue already, so the only step is to apply patch. Original author seems to be offline for a while now. Here is a patch =)Attached Files:
-
-
Wulf Community Admin
-
I'm working under the covalence plugin and wanna make some kind of pm between console and the player.
Yea, sure, I can just use Puts, but the whole plugin working on the Reply(IPlayer player, string langkey, params obejct[] args) function that will automaticly format text according to the lang file and will turn it into the plaintext(console) or formatted text(chat), so....
Yes - I can use a simple way - puts. But hey - who the hell go thro the easy way? -
Wulf Community Admin
-
What functionallity? Getiing IPlayer of the server or createing a way to communicate between server-player in private? If you are talking about the second one - no, it won't. Oxide doesn't ment for..... hey, why no? If you feel like doing so - it would be nice =)
There is plugin for this already - you made it =) ConsoleMessages for Rust | Oxide But it works only for rust, so...
Idk, may be I'll post this part of my plugin on oxide, so there would be a unversal plugin for this. -
Wulf Community Admin
Ideally the player can be replied to directly though. -
So what? Should I post this stripted version on oxide or you are going to make this functionallity part of the oxide itself?