TakePlayerScreenShot: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server function}} This function forces a client to capture the current screen output and send it back to the server. The image will contain the GTA HUD and the output...") |
No edit summary |
||
Line 15: | Line 15: | ||
===Optional Arguments=== | ===Optional Arguments=== | ||
*'''tag :''' A string to help identify the screen capture. The string is passed to the matching [[onPlayerScreenShot]] event for your personal convenience. | *'''tag :''' A string to help identify the screen capture. The string is passed to the matching [[onPlayerScreenShot]] event for your personal convenience. | ||
*'''quality :''' Quality of the final JPEG image. A lower value can reduce the size of the image considerably which will result in faster and less intrusive uploads. | *'''quality :''' Quality of the final JPEG image from 0 to 100. A lower value can reduce the size of the image considerably which will result in faster and less intrusive uploads. | ||
*'''maxBandwith :''' The amount of client upload bandwidth to use (in bytes per second) when sending the image. | *'''maxBandwith :''' The amount of client upload bandwidth to use (in bytes per second) when sending the image. | ||
*'''maxPacketSize :''' The maximum packet size to use when sending image data. This is a tuning parameter for future use - The default value should be OK for now. | *'''maxPacketSize :''' The maximum packet size to use when sending image data. This is a tuning parameter for future use - The default value should be OK for now. |
Revision as of 19:12, 19 January 2012
This function forces a client to capture the current screen output and send it back to the server. The image will contain the GTA HUD and the output of any dxDraw functions that are not flagged as 'post GUI'. The image specifically excludes the chat box and all GUI (including the client console). The result is received with the event onPlayerScreenShot.
Syntax
bool takePlayerScreenShot( player thePlayer, int width, int height [ , string tag = "", int quality = 30, int maxBandwith = 5000, int maxPacketSize = 500 ] )
Required Arguments
- thePlayer: the player to get the screen capture from.
- width: the width of the capture image.
- height: the height of the capture image.
Optional Arguments
- tag : A string to help identify the screen capture. The string is passed to the matching onPlayerScreenShot event for your personal convenience.
- quality : Quality of the final JPEG image from 0 to 100. A lower value can reduce the size of the image considerably which will result in faster and less intrusive uploads.
- maxBandwith : The amount of client upload bandwidth to use (in bytes per second) when sending the image.
- maxPacketSize : The maximum packet size to use when sending image data. This is a tuning parameter for future use - The default value should be OK for now.
Returns
Returns true if the function was successfully, false if invalid arguments are specified.
Example
This example will initiate a capture of Bob's screen
local player = getPlayerFromName( "Bob" ) takePlayerScreenShot( player, 320, 240 )
Requirements
This template will be deleted.
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState