Raised This Month: $ Target: $400
 0% 

Need some help. [ Not sure where i went wrong. ]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
alfino
Junior Member
Join Date: Mar 2005
Old 04-02-2005 , 19:30   Need some help. [ Not sure where i went wrong. ]
Reply With Quote #1

Code:
#include <amxmod> 
#include <amxmisc>

public plugin_init()
{
	register_plugin("Random Glow", "1", "Alfred")
	register_cvar("amx_glowdelay","40")
}

new Float:LastGambleTime[33]

public client_connect(id){
	LastGambleTime[id] = -1000.0
	return PLUGIN_CONTINUE
}

public client_disconnect(id){
	LastGambleTime[id] = -1000.0
	return PLUGIN_CONTINUE
}

public HandleSay(id){
	new Speech[192]
	read_args(Speech,192)
	remove_quotes(Speech)
	if(HandleSay2(id,Speech))	
	{
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE
}

public HandleSay2(id,Speech[])
{
	if ( (equali(Speech, "glow me")) )
	{
		if (get_gametime() < LastGambleTime[id] + get_cvar_float("amx_glowdelay"))
		{
			client_print(id,print_chat, "[AMXX] <Painter> Hey, i ain't no machine! Let me have some rest!")
			return PLUGIN_HANDLED
		}
		new User[32]
		get_user_name(id,User,32)
		new Red = random(256)
		new Green = random(256)
		new Blue = random(256)

		set_user_rendering(id,kRenderFxGlowShell, Red, Green, Blue, kRenderNormal,16)
		client_print(id,print_chat, "[AMXX] <Painter> I've painted you.", User)		
		client_print(0,print_chat, "[AMXX] <Painter> Ok, I've painted %s. Next!", User)

	}
	LastGambleTime[id] = get_gametime()
	return PLUGIN_CONTINUE
}
What this plugin, technically, is to paint the user with random colours when he / she says "glow me". When i compile the .sma, there's no error. But somehow, it doesn't work. It shows the plugin as running, but when i type "glow me", nothing happens. Can some one help me?

And btw, i copied those codes from someone. I ain't a good Small programmer, so i took bits and parts from different codes.
alfino 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 09:49.


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