kibook / pmms

Synchronized media player for FiveM and RedM
136 stars 57 forks source link

can't put URL #37

Closed parham-tehrani closed 2 years ago

parham-tehrani commented 2 years ago

the bar to paste the URL doesn't show up and it says no nearby media players image

kibook commented 2 years ago

It seems like the permissions aren't set up. Make sure you've done every step in the Installing section of the README, particularly step 3.

parham-tehrani commented 2 years ago

i had followed the instruction and removed all the permission's limits so that everyone could do it...still couldn't make it work ... :( i'll remove everything and re add them all...will keep you posted :) thank you for the response !

kibook commented 2 years ago

If you made changes to permissions.cfg, could you post what yours contains so I can see if the problem lies there?

You can also confirm whether the permissions have actually been loaded or not by using the list_aces command in the server console (not the in-game console that appears with F8). Look for lines matching the ones in permissions.cfg. If they are not present, then permissions.cfg was probably not executed.

The permissions out of the box do allow everyone to use pmms, they only restrict players not in group.admin to using URLs from "allowed" sites only, the default being YouTube and Twitch. You generally don't want to grant everyone permissions like pmms.manage, as that is meant for an admin user and will allow players to see and control active media players from anywhere on the map, not just those nearby.

parham-tehrani commented 2 years ago

image

so this is the config file, i added the http manager, then i added the pmms, started it as well...

parham-tehrani commented 2 years ago

aight it worked...idk how, restarted the pmms couple of times and it worked ! :D THANK YOUUUUU

kibook commented 2 years ago

Glad it's working! You might want to try it with the default permissions.cfg now as well, because that should have also worked and may make more sense, especially on a public server. pmms.manage in particular is normally reserved for admin users, which is why that line giving it to builtin.everyone (which means all players) is commented out by default. It means all players will be able to see and control every active media player across the whole map, instead of just the ones close by to them, which could be confusing.

parham-tehrani commented 2 years ago

is it possible to make it job specific ?!

parham-tehrani commented 2 years ago

how does the lock work ?! and is it possible to add new objects as players?!

rhapidfyre commented 2 years ago

For anyone else coming across this ticket later, I had a similar issue.

Be sure to read the documentation. You need to set up a renderer before trying to play anything.. So if the URL box is missing or it won't let you click in it, create a render screen first.

kibook commented 2 years ago

is it possible to make it job specific ?!

If you want only certain players to have access to pmms at all, like only players who are approved DJs, you can make sure only those players have the pmms.interact ACE. For example, instead of:

add_ace builtin.everyone pmms.interact allow

which allows all players basic access to pmms, you can use:

add_ace group.dj pmms.interact allow

to only allow players in the group.dj principle.

Alternatively, if you just want a DJ to be able to lock certain media players while they are using them to prevent other players from interrupting, you can give them the pmms.manage ACE:

add_ace group.dj pmms.manage allow

If you're not familiar with how FXServer ACEs and principles work, check out this guide: https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917

If you need more fine-tuned control of who can use what objects to play media, for example, if you have a housing system and only want the owner of the house to be able to control the TV inside, you can disallow the pmms.anyEntity ACE for normal players, and then use the enableEntity and disableEntity exports within your own scripts to grant specific players access to specific objects.

how does the lock work ?!

Players with the pmms.manage ACE can click the lock icon next to a media player in the pmms UI to prevent players without that ACE from being able to interact with it (change what's playing, stop it, etc.). Note that you can only lock active media players, ones that are playing something already, so you have to play something first and then lock it.

is it possible to add new objects as players?!

Only players with the pmms.manage ACE can add new models to the configuration in-game, and obviously only an admin or developer with access to your server files can add new models to config.lua. You could give all players pmms.manage, but I would recommend against that unless your server is just a private one for a group of friends. If there is a type of object you want to be able to be used as a media player, just make sure to add it to Config.models in config.lua, or using the in-game UI.