29.12.2011, 23:58
Quote:
Код:
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; } |
pawn Код:
if(strcmp(cmd, "/play", true) == 0)
{
foreach(Player, id)
{
if(!Audio_IsClientConnected(id)) continue;
// Check Player position and continue if Player is within range
new play = Audio_Play(id, 1);
// Get playerid position for Audio_Set3DPosition , before the foreach loop would be much better
Audio_Set3DPosition(id, play, x, y, z, 20.0);
}
return 1;
}