Allow usage for players that haven't connectedSuggestion
Hi,

I have a group of servers which people can purchase VIP on and applies to all servers.

When they purchase VIP I want it to activate for all my servers at once. I use GPay on one server instance which executes a plugin which issues commands via remote RCON to all of my servers in turn once a purchase is made to "addgroup <SteamID> vip 30d" etc.

I was hoping I could use Timed Permissions on each of my servers to handle the VIP activation and removal after 30d in this way, but it only activates for the server or servers that the player has actually played on. If the server hasn't "seen" them I simply get the message "Could not find player with ID '<SteamID>'"

I confirmed by trying to add the player manually to the VIP group on all servers using the command in RCON console, but again it gives me the same error with correct SteamID, but it works on the server the player is currently playing on or has previously.

Am I doing something wrong, I can't see a mention anywhere of different commands that would fix this.

Any help please?
5e13a8d5b2bc5.jpg Wulf
Has the player ever connected before? Pretty sure this would only work for those that have connected, as you mentioned. You can see more info here: https://umod.org/community/timed-permissions/18404-cant-add-player-that-hasnt-connected-before

Thanks for the reply, not sure how I didn't see that thread as I thnought I had taken a good look!

So it would appear I need to start using a central database or data file that all servers can use to add/remove players to their relevant groups.
Do you know if I use symbolic links to a single data file for TimedPermissions that all my servers shared would that work correctly or give me more of a headache?



Merged post

Oh, scratch that, i have 4 instances hosted accross 2 dedicated servers so that isn't going to work anyway! haha
But out of interest is it possible to use sym links in that way? Instead of symlinking the TimedPermissions data file, can the oxide.users.data file be symlinked or will there be read/write errors if the file is in use by another instance?

Merged post

Kinda linked with this too, I notice that if I use the "oxide.usergroup add <steamid> <group>" command on a user that hasn't connected before, it adds an entry to the oxide.users.data file, but leavs the name field as "Unnamed". If that player then joins the server for the first time after issuing that command, will they be assigned to that <group> correctly and assume all the associated permissions of that group? Thanks for any input.
You can't associate a group to a steam id that has not been connected to the server before. You will get a NRE.
The safest implementation is to apply the permission when the player is connected, like this plugin does by default.

You could work around this by developing or modifying this plugin to look in a separate database where you will list all IDs that should or have receive the permission. Then put that in a OnPlayerInit hook or similar to check a connected player's steam ID towards your database and if it exists, it will add the appropriate permission.
5b6e8e8102e58.jpg FakeNinja
You can't associate a group to a steam id that has not been connected to the server before. You will get a NRE.
The safest implementation is to apply the permission when the player is connected, like this plugin does by default.

You could work around this by developing or modifying this plugin to look in a separate database where you will list all IDs that should or have receive the permission. Then put that in a OnPlayerInit hook or similar to check a connected player's steam ID towards your database and if it exists, it will add the appropriate permission.
Thanks for the info and suggestion. Might just do that.