Raised This Month: $ Target: $400
 0% 

XMAS Sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 11-29-2010 , 17:08   XMAS Sound
Reply With Quote #1

Can you help me with this code, i have some pc issue (desktop freeze when PLAYTIME is up)

Code:
#include < amxmodx > #include < cstrike > #include < fakemeta > #define MAXPLAYERS 32 #define PLAYTIME 5.0 new Float:g_PlayTime [MAXPLAYERS+1] public plugin_init() {     register_plugin("x","x","x")     register_forward ( FM_PlayerPreThink, "fw_PlayerPreThink" ) } public client_putinserver(id) {     if (!is_user_bot(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {         g_PlayTime[id] = get_gametime()     } } public fw_PlayerPreThink(id) {     if (!is_user_alive (id) || !cs_get_user_team (id))         return         while (get_gametime() - g_PlayTime [id] > PLAYTIME) {         set_task(5.0, "xmas_sound", 0, "", 0, "b")         g_PlayTime[id] -= PLAYTIME     } } public plugin_precache() {     precache_sound("server/xmas.wav") } public xmas_sound(id) {     //emit_sound(0, CHAN_VOICE, xs_file, 1.0, ATTN_NORM, 1, PITCH_NORM)     emit_sound(id, CHAN_AUTO, "server/xmas.wav", 1.0, ATTN_IDLE, 0, PITCH_NORM) }
I try 10 times already ;[

Last edited by xakintosh; 11-30-2010 at 05:31.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
 



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 11:25.


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