The Sit anywhere script

Hello guys, I have a request for the script “the sit anywhere script”, I want that if the player does not have the opportunity to sit down (there are no suitable conditions), this function was output

notification.AddLegacy( "You cannot sit there!", NOTIFY_ERROR, 2 )
surface.PlaySound( "buttons/button15.wav" )

If anyone has dealt with this script, please help, I will be grateful!

You would have to insert that piece of code where the script checks if the player is allowed to sit where it requests. I would think that this is done serverside so you probably have to network the notification in order to call it on the client. But if you are running DarkRP you could use DarkRP.Notify which have networking built in.

i cannot find where it requests, all script on serverside.

Then you have to network it

idk how, it’s request

If it’s a request, then it shouldn’t be in the developer section. This section is for people who are trying to learn and need some help, not for people unwilling to learn and want spoon feeding.

ok, where it need to be?