⚒️Utilities
RSC.HasAccess
RSC.HasAccess( ply: Entity, cb: function(bool) )
Checks if specified player can use screengrabber. Calls cb
argument with boolean passed. Passes true if player have access, otherwise false.
On clientside this function only checks local player. Argument ply
ignored.
RSC.AsyncHasAccess
Promise<bool> RSC.AsyncHasAccess( ply: Entity )
Same as RSC.HasAccess. Instead of calling callback returns a promise that fulfilled with boolean.
RSC.CanScreengrab
RSC.CanScreengrab( receiver: Entity, victim: Entity, cb: function(bool) )
Checks if specified receiver can screengrab victim. Calls cb
argument with passed boolean. Passes true if receiver can screengrab victim.
RSC.AsyncCanScreengrab
Promise<bool> RSC.AsyncCanScreengrab( receiver: Entity, victim: Entity )
Same as RSC.CanScreengrab. Instead of calling callback returns a promise that fulfilled with boolean.
RSC.ParseQuality
str, number RSC.ParseQuality( quality: number )
Returns image format (png or jpeg) and jpeg quality. If quality == 2 then returns png image format If quality == 1 or 2 then returns jpeg image format and 80 or 60 jpeg quality
RSC.ParseQuality(2) -- "png", 80
RSC.ParseQuality(1) -- "jpeg", 80
RSC.ParseQuality(0) -- "jpeg", 60
RSC.FindPlayer
Entity/nil RSC.FindPlayer( searchString: str )
Finds player by search string. Can search by steamid, steamid64 and part of a player name. Returns entity if found, otherwise nil
RSC.Capture
RSC.Capture( quality: number, onMessage: function(MESSAGE_TYPE, str), onResult: function(bool, str) )
This function is used internally to capture local screen.
This function is used internally. You probably shouldn't use it.
Last updated