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.