AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Music Game (https://forums.alliedmods.net/showthread.php?t=193310)

retoxx 08-18-2012 06:12

Music Game
 
The thing is that I have a Music Game where you can start music and stop the music but when I click "STOP" the music keeps playing.

PHP Code:

public Dans_handler(idmenuitem)
{
    if (
item == MENU_EXIT)
        {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64]
    new 
accescallback
    menu_item_getinfo
(menuitemaccesdata,5iName63callback)
    
    new 
key str_to_num(data)
    
    switch(
key)
    { 
        case 
1
        {
            
client_cmd(0"spk %s"g_szSound3)
            
set_dhudmessage(255850, -1.00.1222.02.0)
            
show_dhudmessage(id"[OG-G] DaysMenu ^n Dance until the music stops!"
        }
        case 
2:    client_cmd(0"spk stop")
    
        
    }
    
    return 
PLUGIN_HANDLED



Arkshine 08-18-2012 06:28

Re: Music Game
 
"spk stop" doesn't exist. Use "stopsound".

retoxx 08-18-2012 06:40

Re: Music Game
 
Solved.


All times are GMT -4. The time now is 05:42.

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