Raised This Month: $ Target: $400
 0% 

passing id through set_task


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 06-11-2009 , 19:21   passing id through set_task
Reply With Quote #1

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

new energy[33];

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	return PLUGIN_CONTINUE
}
public client_putinserver(id) {

	//Welcome message
	new cName[33]
	get_user_name(id,cName,32)
	client_print(0,print_chat,"Velkommen %s",cName)
	
	set_task(6.0,"showPool",0,_,_,"b")
	set_task(3.0,"addEnergy",0,_,_,"b")
	
	return PLUGIN_CONTINUE
}

public addEnergy(id) {
	energy[id] += 1
	
	new cName[33]
	get_user_name(id,cName,32)
	
	client_print(0,print_chat,"UN:%s",cName)
}
When the server prints text, i does not show the actual name, it shows "Counter-Strike" as if it's getting the servername instead of the player name.

I've roughly searched the forum whitout any result... i would be more than glad for any help.
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
 



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 13:57.


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