Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* -------------------------------------------------------------------
- Présentation du filterscript :
- Small Boombox system v2 a été créé par S4T3K pour la communauté SF-RP.
- Il permet d'utiliser le très apprécié système de boombox, la radio qui diffuse de la musique aux joueurs à proximité.
- Commandes du filterscript :
- • /boombox : Crée une radio et joue la station choisie
- • /acheterradio : Permet au joueur d'acheter une boombox si il est au 24/7
- • /boomboxoff : Détruit la radio que le joueur a posé
- • /changermusique : Change la station de radio actuellement jouée. Seul le joueur ayant posé la radio peut le faire.
- • /adestroyb [ID du propriétaire de la boombox] : Permet aux Administrateurs de niveau 2 ou plus de détruire une boombox gênante.
- Crédits du filterscript :
- • S4T3K (Jay/Mark/Soufiane) : Filterscript de radio de base
- • S4T3K (Jay/Mark/Soufiane) : Création et optimisation du filterscript à partir de celui de la radio
- • LordMan & FullDrive pour les fonctions ABroadCast et ProxDetector
- • La communauté française de SA-MP & Konstantinos : Optimisation/Débug/Aide/M'avoir fait réaliser que j'avais mon son à 0
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Changelog :
- V1.0 :
- • Création du filterscript (majoritairement buggé et très mal optimisé)
- V2.0 :
- • Ajout de la commande /changermusique
- • Ajout de la commande /boomboxoff
- • Ajout de la commande /adestroyb [ID du propriétaire de la boombox]
- • Ajout de l'option "Radio personnalisée"
- • Le nom de la personne ayant créé la boombox est affiché au dessus de celle-ci
- • Optimisation majeure (Création de la fonction createboombox pour remplacer ce code qui revenait régulièrement)
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /[---------------------------------------]
- /[/!\ Conservez les crédits, merci :) /!\]
- /[/!\ Conservez les crédits, merci :) /!\]
- /[---------------------------------------]
- ------------------------------------------------------------------- */
- // Section Includes
- // A modifier en conséquence si vous n'avez pas les includes
- #include <a_samp>
- #include <core>
- #include <float>
- #include <time>
- #include <file>
- #include <dini>
- #include <utils>
- #include <morphinc>
- #include <time>
- #include "gl_common.inc"
- // Section defines
- #define MAX_RADIO_SOL 100 // A modifier si trop lourd
- #define DIALOG_RADIOS 9510 // A modifier si déjà pris
- #define DIALOG_NRJ 9511 // A modifier si déjà pris
- #define DIALOG_CHOIX 9512 // A modifier si déjà pris
- #define COLOR_ACTION 0xC2A2DAFF
- #define COLOR_ME COLOR_ACTION // Modifier COLOR_ME par le nom de la couleur de votre /me si vous voulez pas remplacer COLOR_ACTION dans tout le GM. Sinon, effacer/commenter cette ligne.
- // Section forwards
- forward destroyboombox(playerid);
- forward createboombox(playerid);
- forward ABroadCast(color,const string[],level); // By LordMan
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5); // By LordMan
- // Section new
- new boombox[MAX_PLAYERS] = 0;
- new boomboxtotal;
- new Text3D:display[MAX_PLAYERS];
- new radio[700];
- new string[256];
- // Enum
- enum pInfo
- {
- pRadio,
- pAdmin,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- // Autres
- #pragma tabsize 0
- // Mes callbacks
- public createboombox(playerid)
- {
- new playername[60];
- GetPlayerName(playerid, playername, sizeof(playername));
- new Float:x, Float:y, Float:z, Float:distance;
- GetPlayerPos(playerid, x, y, z);
- distance = 50.0;
- new string[256];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- StopAudioStreamForPlayer(i);
- PlayAudioStreamForPlayer(i, radio, x, y, z, distance);
- SetPVarInt(playerid, "RadioON", 1);
- format(string, sizeof(string), "Boombox [%s] [%d]", playername, playerid);
- new bitem[MAX_PLAYERS] = random(1) + 1;
- switch(bitem[playerid])
- {
- case 1:
- {
- boombox[playerid] = CreateObject(2103, x, y, z, 0.0, 0.0, 0.0);
- }
- case 2:
- {
- boombox[playerid] = CreateObject(2102, x, y, z, 0.0, 0.0, 0.0);
- }
- default:
- {
- boombox[playerid] = CreateObject(3030, x, y, z, 0.0, 0.0, 0.0);
- }
- }
- display[playerid] = Create3DTextLabel(string, COLOR_ACTION, x, y, z+1, 15.0, GetPlayerVirtualWorld(playerid), 0);
- }
- return 1;
- }
- public destroyboombox(playerid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new Float:bx, Float:by, Float:bz;
- GetObjectPos(boombox[playerid], bx, by, bz);
- DestroyObject(boombox[playerid]);
- SendClientMessage(playerid, -1, "{9ACD32}[Information]{FFFFFF} Vous avez retiré votre boombox du sol ! Vous pouvez la reposer quand vous voulez !");
- Delete3DTextLabel(Text3D:display[playerid]);
- boomboxtotal--;
- DeletePVar(playerid, "RadioON");
- if(IsPlayerInRangeOfPoint(i, 50.0, bx, by, bz))
- {
- StopAudioStreamForPlayer(i);
- }
- }
- return 1;
- }
- // ABroadCast by LordMan //
- public ABroadCast(color,const string[],level)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (PlayerInfo[i][pAdmin] >= level)
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- }
- return 1;
- }
- // ProxDetector by LordMan //
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- //radi = 2.0; //Trigger Radius
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- SendClientMessage(i, col5, string);
- }
- }
- }
- }//not connected
- return 1;
- }
- // Callback officielles
- main()
- {
- print("----------------------------");
- print("-Advanced Boombox System 2.0");
- print("By S4T3K (Mark/Jay/Soufiane)");
- print("----------------------------");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new tmp[30];
- new idx;
- if(strcmp("/boombox", cmdtext, true, 6) == 0)
- {
- if(PlayerInfo[playerid][pRadio] == 1)
- {
- if(GetPVarInt(playerid, "RadioON") != 0)
- {
- new Float:x, Float:y, Float:z;
- GetObjectPos(boombox[playerid], x, y, z);
- SetPlayerCheckpoint(playerid, x, y, z, 5.0);
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous avez déjà posé une radio ! Si vous avez oublié sa position, elle a été marquée sur votre radar !");
- }
- if(boomboxtotal + 1 < MAX_RADIO_SOL)
- {
- ShowPlayerDialog(playerid, DIALOG_RADIOS, DIALOG_STYLE_LIST, "Radios", "Skyrock\nNRJ\nFun Radio\nVirgin Radio\nRadio personnalisée\n", "Mettre", "Quitter");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Il y a déjà trop de radios posées au sol ! Réessayez dans quelques minutes !");
- }
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'avez pas de radio ! Allez en acheter une au 24/7 !");
- }
- return 1;
- }
- if(strcmp("/acheterradio", cmdtext, true, 13) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 10.0, 0.0, 0.0, 0.0)) // Position du 24/7
- {
- if(GetPlayerMoney(playerid) < 0)
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'avez pas assez d'argent ! (Prix d'une radio : 0$)");
- }
- if(PlayerInfo[playerid][pRadio] == 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous avez déjà une radio ! Utilisez /boombox pour l'utiliser !");
- }
- PlayerInfo[playerid][pRadio] = 1;
- GivePlayerMoney(playerid, 0);
- SendClientMessage(playerid, -1, "{9ACD32}[Information]{FFFFFF} Vous avez acheté une radio ! Utilisez /boombox pour la poser et l'utiliser !");
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF] Vous n'êtes pas au 24/7 !");
- }
- return 1;
- }
- if(strcmp("/adestroyb", cmdtext, true, 10) == 0)
- {
- if(PlayerInfo[playerid][pAdmin] < 2)
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'avez pas accès à cette commande !");
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, -1, "{33CCFF}Utilisation : {FFFFFF} /adestroyb [ID du propriétaire de la boombox]");
- return 1;
- }
- new giveplayer;
- new giveplayername[MAX_PLAYER_NAME] = 0;
- new playername[MAX_PLAYER_NAME] = 0;
- giveplayer = ReturnUser(tmp);
- GetPlayerName(playerid, playername, sizeof(playername));
- GetPlayerName(giveplayer, giveplayername, sizeof(giveplayername));
- new Float:bx, Float:by, Float:bz;
- GetObjectPos(boombox[giveplayer], bx, by, bz);
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, bx, by, bz))
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'êtes pas à la position de la boombox de ce joueur !");
- }
- DestroyObject(boombox[giveplayer]);
- Delete3DTextLabel(Text3D:display[giveplayer]);
- boomboxtotal--;
- DeletePVar(giveplayer, "RadioON");
- format(string, sizeof(string), "{9ACD32}[Information]{FFFFFF} Vous avez détruit la boombox de %s", giveplayername);
- SendClientMessage(playerid, -1, string);
- format(string, sizeof(string), "{9ACD32}[Information]{FFFFFF} Votre boombox a été détruite par l'Admin %s", playername);
- SendClientMessage(giveplayer, -1, string);
- format(string, sizeof(string), "{9ACD32}[Information]{FFFFFF} L'Admin %s a détruit la boombox de %s", playername, giveplayername);
- ABroadCast(-1, string, 1);
- return 1;
- }
- if(strcmp("/boomboxoff", cmdtext, true, 11) == 0)
- {
- if(GetPVarInt(playerid, "RadioON") != 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'avez posé aucune boombox !");
- }
- new Float:bx, Float:by, Float:bz;
- GetObjectPos(boombox[playerid], bx, by, bz);
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, bx, by, bz))
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'êtes pas près de votre boombox ! Si vous avez oublié sa position, elle a été marquée sur votre radar !");
- SetPlayerCheckpoint(playerid, bx, by, bz, 5.0);
- }
- destroyboombox(playerid);
- }
- if(strcmp("/changermusique", cmdtext, true, 15) == 0)
- {
- new playername[60];
- GetPlayerName(playerid, playername, sizeof(playername));
- if(GetPVarInt(playerid, "RadioON") != 1)
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'avez posé aucune boombox !");
- }
- new Float:bx, Float:by, Float:bz;
- GetObjectPos(boombox[playerid], bx, by, bz);
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, bx, by, bz))
- {
- SendClientMessage(playerid, -1, "{FF0000}[Erreur]{FFFFFF} Vous n'êtes pas à proximité de votre boombox !");
- }
- ShowPlayerDialog(playerid, DIALOG_RADIOS, DIALOG_STYLE_LIST, "Radios", "Skyrock\nNRJ\nFun Radio\nVirgin Radio\nRadio personnalisée\n", "Mettre", "Quitter");
- format(string, sizeof(string), "%s s'approche de la boombox et change la station", playername);
- ProxDetector(15.0, playerid, string,COLOR_ACTION,COLOR_ACTION,COLOR_ACTION,COLOR_ACTION,COLOR_ACTION);
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_RADIOS)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, -1, DIALOG_STYLE_MSGBOX, "Fermer", "Fermer le dialog", "Ok", "Ok");
- }
- else
- {
- if(listitem == 0)
- {
- format(radio, sizeof(radio), "http://player.skyrock.fm/V4/skyrock/skyrock.m3u");
- createboombox(playerid);
- SendClientMessage(playerid, -1, "{9ACD32}Vous avez mit Skyrock sur la boombox !");
- }
- if(listitem == 1)
- {
- new sz_Info[433] = "NRJ Normal\nNRJ by Disney\nNRJ Club\nNRJ Dance\nNRJ French\nNRJ Friendly\nNRJ Girl\nNRJ Hits\nNRJ Ibiza\nNRJ In Bed\n NRJ iTunes\nNRJ Spécial Lady Gaga\nNRJ Lounge\nNRJ Master Mix\nNRJ Spécial Mickael Jackson\n";
- strcat(sz_Info, "NRJ New York\nNRJ Next\nNRJ Nouveautés\nNRJ Party\nNRJ Pop\nNRJ Rap FR\nNRJ Rap US\nNRJ Spécial Rihanna\nNRJ RnB\nNRJ Rock\nNRJ Running\nNRJ Spécial Shakira\nNRJ Shop\nNRJ Sun\nNRJ Spécial Black Eyed Peas\nNRJ Spécial Usher");
- ShowPlayerDialog(playerid, DIALOG_NRJ, DIALOG_STYLE_LIST, "NRJ", sz_Info, "Jouer", "Retour");
- }
- if(listitem == 2)
- {
- format(radio, sizeof(radio), "http://icecast.funradio.fr/fun-1-44-128.m3u");
- createboombox(playerid);
- SendClientMessage(playerid, -1, "{9ACD32}[Information]{FFFFFF} Vous avez mit Fun Radio sur la boombox !");
- }
- if(listitem == 3)
- {
- format(radio, sizeof(radio), "tream5.nrj.yacast.net/virginradio.m3u");
- createboombox(playerid);
- SendClientMessage(playerid, -1, "{9ACD32}[Information]{FFFFFF} Vous avez mit Virgin Radio à la radio !");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, DIALOG_CHOIX, DIALOG_STYLE_INPUT, "Radio personnalisée", "Mettez le lien de votre musique/playlist personnalisée (formats actuellement supportés : mp3, ogg, m3u, pls)", "Jouer", "Retour");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_NRJ)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, DIALOG_RADIOS, DIALOG_STYLE_LIST, "Radios", "Skyrock\nNRJ\nFun Radio\nVirgin Radio\nProposez vos idées (avec le lien en .m3u)\n", "Mettre", "Quitter");
- }
- else
- {
- if(listitem == 0)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj/all/nrj_113225.mp3");
- createboombox(playerid);
- }
- if(listitem == 1)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_by_disney/all/nrj_152411.mp3");
- createboombox(playerid);
- }
- if(listitem == 2)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_clubbin/all/nrj_153250.mp3");
- createboombox(playerid);
- }
- if(listitem == 3)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_dance/all/nrj_151505.mp3");
- createboombox(playerid);
- }
- if(listitem == 4)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_french/all/nrj_155913.mp3");
- createboombox(playerid);
- }
- if(listitem == 5)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_french/all/nrj_155913.mp3");
- createboombox(playerid);
- }
- if(listitem == 6)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_girl/all/nrj_153716.mp3");
- createboombox(playerid);
- }
- if(listitem == 7)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_hits/all/nrj_150726.mp3");
- createboombox(playerid);
- }
- if(listitem == 8)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_ibiza/all/nrj_164849.mp3");
- createboombox(playerid);
- }
- if(listitem == 9)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_in_bed/all/nrj_135650.mp3");
- createboombox(playerid);
- }
- if(listitem == 10)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_itunes/all/nrj_153938.mp3");
- createboombox(playerid);
- }
- if(listitem == 11)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_lady_gaga/all/nrj_152704.mp3");
- createboombox(playerid);
- }
- if(listitem == 12)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_lounge/all/nrj_151750.mp3");
- createboombox(playerid);
- }
- if(listitem == 13)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_mastermix/all/nrj_163522.mp3");
- createboombox(playerid);
- }
- if(listitem == 14)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_michael_jackson/all/nrj_154634.mp3");
- createboombox(playerid);
- }
- if(listitem == 15)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_new-york/all/nrj_140527.mp3");
- createboombox(playerid);
- }
- if(listitem == 16)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_next/all/nrj_122336.mp3");
- createboombox(playerid);
- }
- if(listitem == 17)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_nouveaute/all/nrj_161209.mp3");
- createboombox(playerid);
- }
- if(listitem == 18)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/2051/nrj_party/nrj_190407.mp3");
- createboombox(playerid);
- }
- if(listitem == 19)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_pop/all/nrj_151240.mp3");
- createboombox(playerid);
- }
- if(listitem == 20)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_rap_fr/all/nrj_145338.mp3");
- createboombox(playerid);
- }
- if(listitem == 21)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_rap_us/all/nrj_144854.mp3");
- createboombox(playerid);
- }
- if(listitem == 22)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_rihanna/all/nrj_163955.mp3");
- createboombox(playerid);
- }
- if(listitem == 23)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_rnb/all/nrj_151038.mp3");
- createboombox(playerid);
- }
- if(listitem == 24)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_rock/all/nrj_161510.mp3");
- createboombox(playerid);
- }
- if(listitem == 25)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_running/all/nrj_162813.mp3");
- createboombox(playerid);
- }
- if(listitem == 26)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_shakira/all/nrj_144619.mp3");
- createboombox(playerid);
- }
- if(listitem == 27)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_shop/all/nrj_121822.mp3");
- createboombox(playerid);
- }
- if(listitem == 28)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_soleil/all/nrj_155103.mp3");
- createboombox(playerid);
- }
- if(listitem == 29)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_black_eyed_peas/all/nrj_161845.mp3");
- createboombox(playerid);
- }
- if(listitem == 30)
- {
- format(radio, sizeof(radio), "http://mp3.live.tv-radio.com/nrj_usher/all/nrj_142337.mp3");
- createboombox(playerid);
- }
- return 1;
- }
- return 1;
- }
- if(dialogid == DIALOG_CHOIX)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, DIALOG_RADIOS, DIALOG_STYLE_LIST, "Radios", "Skyrock\nNRJ\nFun Radio\nVirgin Radio\nRadio personnalisée\n", "Mettre", "Quitter");
- }
- else
- {
- format(radio, sizeof(radio), inputtext);
- createboombox(playerid);
- format(string, sizeof(string), "{9ACD32}[Information]{FFFFFF} Vous avez mit votre radio personnalisée (%s) à la radio !", inputtext);
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(GetPVarInt(playerid, "RadioON") != 0) { destroyboombox(playerid); return 1; }
- SendClientMessage(playerid, -1, "{9ACD32}[Information]{FFFFFF} Vous vous êtes déconnecté. Votre boombox a été détruite.");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement