Raised This Month: $ Target: $400
 0% 

Sounds + Menus


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-24-2006 , 17:12   Sounds + Menus
Reply With Quote #1

Hello. I'm back
I still got some problems with my mod.
Reasons: when I emit sounds it continue to play until you disconnect + lack of ideas.

I tried both emit and the spk etc.
They don't play the sound or they play it until you disconnect, and that is very irritating with my current sounds + when it is a level up it should play a sound but it wont work.

Here is the codes I used for them. + No errors while compiling.
Code:
emit_sound(id, CHAN_AUTO, "mythmod/skilluse.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) <- This one plays until you disconnect. //Other at level up     if(g_PlayerXP[attacker] >= LEVELS[g_PlayerLevel[attacker]])       {           g_PlayerLevel[attacker] += 1           client_print(attacker,print_chat,"[Mythology Mod] Congratulations! You are now level %i!", g_PlayerLevel[attacker])           SaveXP(attacker)           ShowHUD(attacker)           emit_sound(id, CHAN_AUTO, "mythmod/levelup.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) <- This one doesn't work.     }

Here is my second problem on the mod.
This is a menu that doesn't work.
Code:
public DoShopMenu(id, key)     {     new usermoney = cs_get_user_money(id)     new userhealth = get_user_health(id)     switch(key)     {         case 0:         {             if(usermoney < EXTRA_HP_COST)             {             return PLUGIN_HANDLED             }             set_user_health(id, userhealth + EXTRA_HP_AMOUNT)             cs_set_user_money(id, usermoney - EXTRA_HP_COST)             return PLUGIN_CONTINUE         }         case 1:         {             if(usermoney < EXTRA_XP_COST)             { return PLUGIN_HANDLED             }             g_PlayerXP[id] += EXTRA_XP_AMOUNT             cs_set_user_money(id, usermoney - EXTRA_XP_COST)             return PLUGIN_CONTINUE         }         case 2:         {             if(usermoney < EXTRA_SPEED_COST)             {             return PLUGIN_HANDLED             }             set_user_maxspeed(id, EXTRA_SPEED.0)             client_cmd(id, "cl_forwardspeed EXTRA_SPEED")             client_cmd(id, "cl_backspeed EXTRA_SPEED")             client_cmd(id, "cl_sidespeed EXTRA_SPEED")             cs_set_user_money(id, usermoney - EXTRA_SPEED_COST)             return PLUGIN_CONTINUE         }     }     return PLUGIN_CONTINUE }

On this menu I don't really know what to do so please help me.
__________________
~~~~~Hawk~~~~~
Werewolf 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:39.


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