06.03.2012, 17:12
Tentei fazer um sistema aqui pra reproduzir musicas ambientais, mas nao funcionou , a musica nгo toca, e quando tocar, fica travando mto.
e como q faz pra tipo, se o player digitar /sb on, se ele tentar digitar de novo, enviar mensagem: Som ambiental ja estб ativado!
e como q faz pra tipo, se o player digitar /sb on, se ele tentar digitar de novo, enviar mensagem: Som ambiental ja estб ativado!
Код:
#include <a_samp>
#define COLOR_WHITE 0xFFFFFFAA
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/sb", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "[USO] /sb on - Ativa os Sons Ambientais");
SendClientMessage(playerid, COLOR_WHITE, "/sb off - Desativa os Sons Ambientais");
return 1;
}
if (strcmp("/sb on", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_WHITE, "[BSL] Som Ambiental Ativado");
PlayAudioStreamForPlayer(playerid, "http://dc404.4shared.com/img/130907008/f91252f3/dlink__2Fdownload_2FZ1mWznVu_3Ftsid_3D20120304-182917-ef307e76/preview.mp3", 2075.5352 , 1306.7965, 10.6719, 50.0, 1);
return 1;
}
if (strcmp("/sb off", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "[BSL] Som Ambiental Desativado");
StopAudioStreamForPlayer(playerid);
return 1;
}
return 1;
}



, nгo sou gкnia simplesmente falo oque tenho devido conhecimento. Claro que vai compilar mais nгo usar bool й um desperdicio inъtil !