new Random[][] = [help = rep+]
#2

Here you go :P

pawn Код:
#include <a_samp>

new RandomElectro[][] =
{
    { "http://*******/1uQ2Zb", "song's name" }
};

public OnPlayerConnect(playerid)
{
    new rand = random( sizeof( RandomElectro ) ), string[ 128 ];

    PlayAudioStreamForPlayer(playerid, RandomElectro[ rand ][ 0 ]);

    format(string, sizeof( string ), "You are listening to %s", RandomElectro[ rand ][ 1 ]);
    SendClientMessage( playerid, -1, string );
    return true;
}
NOTE
  • To send a message with a placeholder, you must use the default sa-mp function called format(...);
Reply


Messages In This Thread
new Random[][] = [help = rep+] - by ic3cr3am - 21.12.2013, 21:25
Re: new Random[][] = [help = rep+] - by Patrick - 21.12.2013, 21:29
Re: new Random[][] = [help = rep+] - by Konstantinos - 21.12.2013, 21:37

Forum Jump:


Users browsing this thread: 2 Guest(s)