Raised This Month: $ Target: $400
 0% 

Can't figure this out


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Razor
New Member
Join Date: Aug 2004
Old 09-01-2004 , 15:03   Can't figure this out
Reply With Quote #1

I seem to be having some difficulty with my code, i've tested it with many different methods, and yet still it doesn't work. All i'd like for it to do is speak Danger.wav when hp is below 20. Take a look at the following code

Code:
#include <amxmodx>
#include <fun>

#define MAX_PLAYERS 32


public plugin_init() {
	 register_plugin("Environment Status","0.1","Lloyd Banks")
	 set_task(1.0,"check_status")
}


public check_status(id)
{
	new iPlayer 
	new iPlayers[MAX_PLAYERS]
	new iNumPlayers
	get_players(iPlayers,iNumPlayers)
	if (get_user_health(iPlayer) < 20)
		{ 
			new name[33]
			get_user_name(0, name, 32)
			client_print(id, print_chat, "Careful %s, Your hp is low!", name)
			client_cmd(id, "spk fvox/danger.wav")
		}
	
    
}
Anybody see something I don't ?
__________________
69.90.156.137:27015 2fort 24/7 Killing Fieldz
Love it or leave it
Razor 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 17:13.


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