OnPlayerDownloadFile: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Event|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|OnPlayerDownloadFile}} {{FuncParameters}} == Example == __EDIT_ME__ {{RelatedFunctions}} {{ServerEve..."
 
28days (talk | contribs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Event|Server|1.0}}
{{Info|Event|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Called when a client finished downloading a package file from the server.}}


{{FuncSyntax|OnPlayerDownloadFile}}
{{FuncSyntax|OnPlayerDownloadFile(player, FileName, Checksum)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|player|The player identifier}}
{{FuncParam|FileName|The name of the file they just downloaded.}}
{{FuncParam|Checksum|The checksum hash of the file}}
== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang='Lua'>
AddEvent("OnPlayerDownloadFile", function (player, fileName, checksum)
    print("filename: "..fileName.." checksum: "..checksum..".")
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
{{ServerEvents}}
{{PlayerServerEvents}}

Latest revision as of 17:58, 16 January 2020

OnPlayerDownloadFile

Type: Event
Context: Server
Introduced: v1.0

Description

Called when a client finished downloading a package file from the server.

Syntax

OnPlayerDownloadFile(player, FileName, Checksum)

Parameters

  • player
    The player identifier
  • FileName
    The name of the file they just downloaded.
  • Checksum
    The checksum hash of the file

Example

AddEvent("OnPlayerDownloadFile", function (player, fileName, checksum)
    print("filename: "..fileName.." checksum: "..checksum..".")
end)

See also