Raised This Month: $ Target: $400
 0% 

EmitSoundToAll problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BAILANDO
Senior Member
Join Date: Feb 2015
Location: Slovakia
Old 03-25-2015 , 16:51   EmitSoundToAll problem
Reply With Quote #1

Hello, i need to make small plugin with table where i can start music and stop music. Start Music works fine, but i cant stop music and if i start another music, i have here StopSound and then emit... for next song, but song didnt stop and play another, then i hear two songs at a time. Can someone help me please? Here is a example for a code, i test SNDCHAN_AUTO too. Thanks

Code:
public Action:HudbaTabulka(client, args){     new Handle:hudba = CreateMenu(HudbaMenu);     SetMenuTitle(hudba, "[SM] URNA Hudba Menu DJ");     AddMenuItem(hudba, "mathew", "Matthew Strider");     AddMenuItem(hudba, "poltergeist", "Poltergeist");     SetMenuPagination(hudba, 7);     SetMenuExitButton(hudba, true);     DisplayMenu(hudba, client, MENU_TIME_FOREVER); } public HudbaMenu(Handle:hudba, MenuAction:action, client, Position){     new String:item[32];     if(action == MenuAction_Select){         GetMenuItem(hudba, Position, item, sizeof(item));         if(StrEqual(item, "mathew")){             for(new i = 1; i <= GetMaxClients(); i++){                 if(IsClientInGame(i)){                     StopSound(i, 8, "urna/matthewstrider.mp3");                     StopSound(i, 8, "urna/poltergeist.mp3");                 }             }             EmitSoundToAll("urna/matthewstrider.mp3", SOUND_FROM_WORLD, 8, SNDLEVEL_AIRCRAFT);         }         else if(StrEqual(item, "poltergeist")){             for(new i = 1; i <= GetMaxClients(); i++){                 if(IsClientInGame(i)){                     StopSound(i, 8, "urna/matthewstrider.mp3");                     StopSound(i, 8, "urna/poltergeist.mp3");                 }             }             EmitSoundToAll("urna/poltergeist.mp3", SOUND_FROM_WORLD, 8, SNDLEVEL_AIRCRAFT);         }     } }

Last edited by BAILANDO; 03-25-2015 at 16:52.
BAILANDO is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode