From GT-MP
Jump to: navigation, search
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Transfers a string to the given client. Client scripts then receive this data in onCustomDataReceived.

This is asynchronous, but is often not as fast as sending big chunks of data directly through triggerClientEvent, so choose wisely.


API.downloadData(Client target, string data, int id = 0);

Required Arguments

  • target: parameter input should be in Client type.
  • data: parameter input should be in string type.

Optional Arguments

  • id parameter input should be in int type.

Usage example(s)

API.downloadData(player, File.ReadAllText("some-big-file.txt"));