OnTransferFile - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnTransferFile (
/showthread.php?tid=306972)
OnTransferFile -
tliamg - 28.12.2011
Код:
if(strcmp(cmd, "/play", true) == 0)
{
foreach(Player, id)
{
if(!Audio_IsClientConnected(id)) continue;
new play = Audio_Play(id, 1);
Audio_Set3DPosition(id, play, 1482.2539, -1838.7302, 13.5469, 20.0);
}
return 1;
}
Код:
public Audio_OnClientConnect(playerid)
{
Audio_TransferPack(playerid);
SendClientMessage(playerid, COLOR_WHITE, "DOWNLOAD DATA BEGINS!");
}
public Audio_OnTransferFile(playerid, file[], current, total, result)
{
new string[128];
format(string, sizeof(string), "Loading %d/%d", current, total);
SendClientMessage(playerid, COLOR_WHITE, string);
if (current == total)
{
SendClientMessage(playerid, COLOR_WHITE, "All files have been prepared");
}
return 1;
}
Collect data only for id 0, how to improve it, to be extracted the data for all? Please help.