Team Spartan Cookies & Milk Forums
Prop Protection in SF - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: Prop Protection in SF (/thread-3720.html)



Prop Protection in SF - 4N0NYM - 05-12-2021

Hey, would it be possible to add a function or method to get the current Prop Protection in SF ?  

Including the "Buddies" with their Permissions, but also stuff like "Allow everyone to use your props." and "Allow these players to also use your props:" would be nice too Big Grin


RE: Prop Protection in SF - Person8880 - 05-12-2021

What's the reason for needing this information vs. the existing propprotection.isAllowedFor* functions?


RE: Prop Protection in SF - 57e11a - 05-12-2021

Fairly sure ano wants the ability to check who has access to the owner's stuff, maybe extend the functions to propprotection.isAllowedFor*(thing: entity | player, accessType: enum, plyToCheck: player? = ents.owner()) so you can choose who to check propprotection for?


RE: Prop Protection in SF - 4N0NYM - 05-12-2021

I didnt saw that this Function exist.

Code:
print(propprotection.isAllowedForPlayer(find.playerByName("doc"),propprotection.ACCESS_USE))
it return always true. Despite him not being on my Buddies list nor having other stuff activated.


RE: Prop Protection in SF - Person8880 - 05-12-2021

(05-12-2021, 05:39 PM)4N0NYM Wrote: I didnt saw that this Function.

Code:
print(propprotection.isAllowedForPlayer(find.playerByName("doc"),propprotection.ACCESS_USE))
  it return always true.  Despite him not being on my Buddies list nor having other stuff activated.
That's checking your access to Doc's props, not the other way round.

I've added two new functions to the propprotection library which will let you query other player's access to the chip owner's props (either for a specific entity, or for all entities just like the existing functions). They'll be available after the next restart.


RE: Prop Protection in SF - 4N0NYM - 05-12-2021

Thank you very much. Smile