Posts: 80
Threads: 10
Joined: Jun 2012
Reputation:
0
I tryed to create an music system and searching for one in forum.
Can you help me find something thats work and wont crash my server??
Posts: 701
Threads: 91
Joined: Mar 2012
Here it is ! Use /music for music :
pawn Код:
#include <a_samp>
#define musique (993)
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/Musique_GTA.mp3"); // Lien de la musique heberger en .mp3 , j'ai mit la musique de GTA
return 1;
}
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid); // Surtout ne pas enlever ceci , sinon la musique ne s'arretera pas !
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/music", true)) // Le commande pour ecoutez de la musique
return ShowPlayerDialog(playerid, musique, DIALOG_STYLE_LIST, "Liste des musiques","Lil Jon - Get Low\nMister You - J'regarde en l'air\nPitBull = Give Me Everything\nSean Paul - She Doesn't Mind\nDon Omar - Danza Koduro\nPitbull - Rain Over Me\nDavid guetta - Little Bad Girl\nSkyrock - Radio\nRihanna - SM [Remix]\nRihanna - We Found Love [Remix]\nSnoop Dogg feat. Wiz Khalifa - Young, Wild & Free\nArreter la musique\n","Ecouter","Fermer");
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
PlayAudioStreamForPlayer(playerid, "http://player.skyrock.fm/V4/skyrock/player_V3.html"); // A changer si vous ne voulez pas skyrock comme radio dans le vйhicule
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
StopAudioStreamForPlayer(playerid); // Laissez ceci si vous voulez que la musique s'arrete quand vous sortez du vйhicule
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid){
case musique:
if(response){
switch(listitem){
case 0:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/LilJon-fond.mp3");
}
case 1:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/Mister_You-J'regarde_en_l'air.mp3");
}
case 2:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/Pitbull-Give_Me_Everything.mp3");
}
case 3:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/Sean_Paul-She_Doesn't_Mind.mp3");
}
case 4:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://24.media.v4.skyrock.net/music/245/dcd/245dcdbcbc5b0e5b2f89c26fc1eed062.mp3");
}
case 5:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://pomoi.com/uploads/files/1312972359_pitbull_-_rain_over_me.mp3");
}
case 6:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://3e.media.v4.skyrock.net/music/3e9/64c/3e964c72ea1898edffb9fa03dcde7c0b.mp3");
}
case 7:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://player.skyrock.fm/V4/skyrock/player_V3.html");
}
case 8:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/Rihanna_SM.mp3");
}
case 9:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/We_Found_Love.mp3");
}
case 10:
{
StopAudioStreamForPlayer(playerid);
PlayAudioStreamForPlayer(playerid, "http://cvrp-rp.rd-h.fr/site/images/musiques/Snoop_Dogg_feat_brunimars.mp3");
}
case 11:
{
StopAudioStreamForPlayer(playerid);
}
}
}
}
return 1;
}