11.07.2014, 11:09
Hello everybody today I get strange bug with my song inventory system I don`t know why..So problem is when I use song by command /usesong [SLOT] example slot 1 and there is song Hollywood Undead - Undead in Audio debug text it`s wrtted Hollywood Undead - Undead. Anyone know why here is the code:
Here is screen shot how it looks:
pawn Код:
new InventoryItems[MAX_ITEMS][] = {
{0, "Sidney Samson and Martin Garrix - Torrent", "http://k007.kiwi6.com/hotlink/s65e1e3suc/Sidney_Samson_and_Martin_Garrix_-_Torrent_mp3cut.net_.mp3"},
{1, "Avicii - Wake Me Up", "http://k007.kiwi6.com/hotlink/nudyhhx2fv/Avicii_-_Avicii_-_Wake_Me_Up_mp3cut.net_.mp3"},
{2, "Die Antwoord - Rich Bitch", "http://k007.kiwi6.com/hotlink/rzw3kc240h/Die_Antwoord_-_Rich_Bitch_mp3cut.net_.mp3"},
{3, "Calvin Harris feat. Alesso and Hurts - Under Control", "http://k007.kiwi6.com/hotlink/6zctrsw8uf/Calvin_Harris_and_Alesso_-_Under_Control_ft._Hurts_mp3cut.net_1_.mp3"},
{4, "Martin Garrix - Animals", "http://k007.kiwi6.com/hotlink/hoz1u3oca1/Martin_Garrix_-_Animals_Official_Video_mp3cut.net_1_.mp3"},
{5, "Hollywood Undead - Undead", "http://k007.kiwi6.com/hotlink/aj6ybbw6d1/Hollywood_Undead_-_Undead_mp3cut.net_.mp3"}
};
stock OnPlayerUseItem(playerid,slot)
{
new songstr[200];
switch(InventoryItems[iItem[playerid][slot]][0])
{
case 0:
{
format(songstr,sizeof(songstr),"%s",InventoryItems[0][0]);
PlayAudioStreamForPlayer(playerid, songstr);
}
case 1:
{
}
case 2:
{
}
case 3:
{
}
case 4:
{
}
case 5:
{
format(songstr,sizeof(songstr),"%s",InventoryItems[5][2]);
PlayAudioStreamForPlayer(playerid, songstr);
}
}
return 1;
}