Little Help
#4

Quote:
Originally Posted by arlindi
Посмотреть сообщение
PHP код:
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(playeridsongstr);
        }
        case 
1:
        {
            
        }
        case 
2:
        {
            
        }
        case 
3:
        {
            
        }
        case 
4:
        {
        }
        case 
5:
        {
            
format(songstr,sizeof(songstr),"%s",InventoryItems[0][1]);
            
PlayAudioStreamForPlayer(playeridsongstr);
        }
    }
    return 
1;

REP IF I HELPED
Lol. You're not going to get rep for basically quoting what I just said.

Also @OP:

pawn Код:
switch(InventoryItems[iItem[playerid][slot]][0])
    {
        case 0:
        {
            format(songstr,sizeof(songstr),"%s",InventoryItems[0][0]);
            PlayAudioStreamForPlayer(playerid, songstr);
        }
Won't work, you'll have to add a positive value (not 0) for whatever row you want to call.
Reply


Messages In This Thread
Little Help - by Sanady - 11.07.2014, 11:09
Re: Little Help - by Dignity - 11.07.2014, 11:25
Re: Little Help - by arlindi - 11.07.2014, 11:44
Re: Little Help - by Dignity - 11.07.2014, 11:47
Re: Little Help - by BroZeus - 11.07.2014, 11:53
Re: Little Help - by Sanady - 11.07.2014, 12:22
Re: Little Help - by Konstantinos - 11.07.2014, 12:44
Re: Little Help - by Sanady - 11.07.2014, 13:03
Re: Little Help - by Sanady - 11.07.2014, 13:30

Forum Jump:


Users browsing this thread: 1 Guest(s)