Raised This Month: $ Target: $400
 0% 

Use sound when action done.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-20-2010 , 13:54   Re: Use sound when action done.
Reply With Quote #4

PHP Code:
#include <amxmodx>

#pragma semicolon 1

new cow[] = "sound/cow.wav";
new 
goat[] = "sound/goat.wav";

public 
plugin_init()
{
    
register_plugin("rofl""1337""Drekes");
    
    
register_clcmd("say /menu""mainmenu");
}

public 
plugin_precache()
{
    
precache_sound(cow);
    
precache_sound(goat);
}

public 
mainmenu(id)
{
    new 
menu menu_create("Animal Menu""sub_mainmenu");
    
    
menu_additem(menu"Cow""1"0);
    
menu_additem(menu"goat""2"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu);
}

public 
sub_mainmenu(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
Data[7], Name[64];
    new 
AccessCallback;
    
menu_item_getinfo(menuitemAccessData,5Name63Callback);
    
    new 
Key str_to_num(Data);
    
    switch(
Key)
    {
        case 
1:
            
client_cmd(id"spk ^"%s^""cow);
            
        case 
2:
            
client_cmd(id"spk ^"%s^"");
    }
    
    return 
PLUGIN_HANDLED;

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 06-20-2010 at 17:02.
drekes is offline
Send a message via MSN to drekes
 



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 14:55.


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