pawn Код:
CMD:desligarmusica(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Desligaste a mъsica");
StopAudioStreamForPlayer(playerid);
return 1;
}
CMD:music1(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - Psy - Gangam Style");
PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/cc48n245pd/music1.mp3");
return 1;
}
CMD:music2(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
return 1;
}
CMD:music3(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
return 1;
}
CMD:music4(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
return 1;
}
CMD:music5(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
return 1;
}
CMD:music6(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
return 1;
}
CMD:music7(playerid, params[])
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
return 1;
}
poderia dar uma otimizada neste caso.
pawn Код:
#include < sscanf >
CMD:musica(playerid, params[])
{
new
music
;
if(sscanf(params, "i", music)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /musica [1 - 7]");
if(0 < music < 7 )
{
switch(music)
{
case 1:
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - Psy - Gangam Style");
PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/cc48n245pd/music1.mp3");
}
case 2:
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
}
case 3:
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
}
case 4:
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
}
case 5:
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
}
case 6:
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
}
case 7:
{
SendClientMessage(playerid,COLOR_RED,"Estбs a ouvir a mъsica - ");
PlayAudioStreamForPlayer(playerid, "LINK DIRETO AQUI");
}
}
}
else SendClientMessage(playerid, 0xFF0000AA, "Use: /musica [1 - 7]");
return true;
}