Raised This Month: $ Target: $400
 0% 

loading sound with timelimit


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mulan
Senior Member
Join Date: Jul 2005
Location: [GER]Worbis
Old 11-03-2005 , 17:58   loading sound with timelimit
Reply With Quote #1

okay... i have a problem. In the German Forum cant me help.

I have AMXX 1.50 an have written a mini-plugin.
This plugin must load a sound after the time i have definied in the amxx.cfg.

Problem: Plugin is loaded and running by AMXX. I cant hear the Sound in-Game after 60 seconds. Why? Plz help me

Code:
#include <amxmodx> 

new sound[] = "change.wav" 
public plugin_init() 
{ 
    register_plugin("TimeSound","1.0","Mulan") 
    register_cvar("amx_time_sound", "60") 
    return PLUGIN_CONTINUE 
} 

public time_sound(id)
{ 
	if(!is_user_connected(id))
		return PLUGIN_CONTINUE
	if(!get_cvar_float("mp_timelimit"))
		return PLUGIN_CONTINUE
   	new timeleft = (get_timeleft()+1)
   	if(timeleft == get_cvar_num("amx_time_sound")) {
   	client_cmd(id,"play sound/misc/%s",sound) 
   	return PLUGIN_CONTINUE 
   	}   
   	return PLUGIN_CONTINUE    	
}
Mulan is offline
Send a message via ICQ to Mulan
 



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 23:38.


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