Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <streamer>
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_BLUE 0x0000BBAA
- new pickupenter;
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------------------");
- print(" Alhambra Club Music System By Kucin666 Loaded...");
- print("--------------------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------------------");
- print(" Alhambra Club Music System By Kucin666 Unloaded...");
- print("--------------------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- pickupenter = CreatePickup(1318, 1, 1836.6548,-1682.4631,13.3389); /*Location in Idlewood, Los Santos */
- CreateDynamicMapIcon(1836.1119,-1681.7277,13.3616, 12, 0); /*Location in Idlewood, Los Santos */
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == pickupenter)
- {
- GameTextForPlayer(playerid,"Type /enterac to enter Alhambra Club",3000,1);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- new string[256], Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- if(dialogid == 1)
- {
- if(response)
- {
- if(IsPlayerInRangeOfPoint(i, 30.0 ,493.390991,-22.722799,1000.679687))
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Music Catalog", "Radio paradise \nSlipknot - Psychosocial \nUdo - Go back to hell", "Select", "Cancel");
- return 1;
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "External Music", "Paste the link of the song, it must be .mp3", "Play", "Cancel");
- }
- if(listitem == 2)
- {
- StopAudioStreamForPlayer(i);
- format(string, sizeof(string), "Admin %s has stop the Music.", Name);
- SendClientMessage(i, COLOR_GREEN, string);
- }
- }
- }
- }
- if(dialogid == 2)
- {
- if(response)
- {
- if(IsPlayerInRangeOfPoint(i, 30.0 ,493.390991,-22.722799,1000.679687))
- {
- if(listitem == 0)
- {
- PlayAudioStreamForPlayer(i, "http://www.radioparadise.com/musiclinks/rp_128.m3u"); /* Replace the song with which you like */
- format(string, sizeof(string), "Admin %s has play the Music.", Name);
- SendClientMessage(i, COLOR_GREEN, string);
- }
- if(listitem == 1)
- {
- PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/54368978/Slipknot%20-%20Psychosocial.mp3"); /* Replace the song with which you like */
- format(string, sizeof(string), "Admin %s has play the Music.", Name);
- SendClientMessage(i, COLOR_GREEN, string);
- }
- if(listitem == 2)
- {
- PlayAudioStreamForPlayer(i, "http://dl.dropbox.com/u/54368978/UDO%20-%20Go%20back%20to%20hell.mp3"); /* Replace the song with which you like */
- format(string, sizeof(string), "Admin %s has play the Music.", Name);
- SendClientMessage(i, COLOR_GREEN, string);
- }
- /* You can add listitem to add music as you like with the numbers 3,4,5 and so on and do not forget to add it in the Music Catalog*/
- }
- else
- {
- StopAudioStreamForPlayer(i);
- SendClientMessage(i, COLOR_YELLOW, "Alhambra Club has played Music, to be able to hear just join the Alhambra Club to know the location type /whereac");
- }
- }
- }
- if(dialogid == 3)
- {
- if(response)
- {
- if(IsPlayerInRangeOfPoint(i, 30.0 ,493.390991,-22.722799,1000.679687))
- {
- PlayAudioStreamForPlayer(i, inputtext);
- format(string, sizeof(string), "Admin %s has play the Music.", Name);
- SendClientMessage(i, COLOR_GREEN, string);
- }
- else
- {
- SendClientMessage(i, COLOR_YELLOW, "Alhambra Club has played Music, to be able to hear just join the Alhambra Club to know the location type /whereac");
- }
- }
- }
- }
- return 0;
- }
- CMD:whereac(playerid,params[]) {
- new Float: DistanceAC = GetPlayerDistanceFromPoint(playerid, 1836.6548,-1682.4631,13.3389), Message[256];
- format(Message, sizeof(Message), "Alhambra Club located in Idlewood, Los Santos at map by letter C picture or %0.2f meters away from your position", DistanceAC);
- SendClientMessage(playerid, COLOR_GREEN, Message);
- return 1;
- }
- CMD:enterac(playerid,params[]) {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 1836.6548,-1682.4631,13.3389))
- {
- SetPlayerPos(playerid, 493.1443,-24.2607,1000.6797);
- SetPlayerInterior(playerid, 17);
- SendClientMessage(playerid, 0x55AADDFF, "You have entered a Alhambra Club.. type /exitac to leave");
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You must be in Alhambra Club Entry to use this command");
- }
- return 1;
- }
- CMD:exitac(playerid,params[]) {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, 493.1443,-24.2607,1000.6797))
- {
- StopAudioStreamForPlayer(playerid);
- SetPlayerPos(playerid, 1834.5427,-1682.4440,13.4272);
- SetPlayerInterior(playerid, 0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You must be near the exit Alhambra Club to /exitac");
- }
- return 1;
- }
- CMD:musicac(playerid,params[]) {
- if(IsPlayerAdmin(playerid)){
- IsPlayerInAlhambraClub(playerid);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an Admin to use this command");
- }
- return 1;
- }
- CMD:gotoac(playerid,params[]) {
- if(IsPlayerAdmin(playerid)){
- new vehid = GetPlayerVehicleID(playerid);
- SetPlayerPos(playerid,503.0094,-11.5719,1000.6797);
- SetPlayerInterior(playerid,17);
- PutPlayerInVehicle(playerid,vehid,0);
- SendClientMessage(playerid, 0x55AADDFF, "You have entered a Alhambra Club.. type /exitac to leave");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be an Admin to use this command");
- }
- return 1;
- }
- stock IsPlayerInAlhambraClub(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 30.0 ,493.390991,-22.722799,1000.679687))
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Alhambra Club Music List", "Music Catalog \nExternal Music \nStop Music", "Select", "Cancel");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "ERROR: You must be in a Alhambra Club in order to use Music");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment