Raised This Month: $ Target: $400
 0% 

Client_print linux issue?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
raa
Senior Member
Join Date: Oct 2005
Old 11-20-2006 , 20:30   Client_print linux issue?
Reply With Quote #1

Why does this code return the correct "kills" in a win32 cs server;
(You are a Private with 114 kills)

but in a linux cs server it returns;
(You are a Private with rF0 kills)

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

#define RANK_CIVILIAN 0
#define RANK_PRIVATE 1
#define RANK_MARSHALL 2

#define MAXRANKS 3

new PlayerRank[33]

new const RANKS[MAXRANKS][] = 
{ 
	"Civilian",
	"Private",
	"Marshall"
}

public plugin_init() 
	{
	register_plugin("Rank Display", "1.0", "")
	register_clcmd("say /myrank","showrank");
}

public showrank(id)     
	{  
	if(!is_user_connected(id))
		return 0
	
	new stats[8]
	new kills[8]
	get_user_stats(id, stats, kills)	
	
	new name[33]
	get_user_name(id, name, 32)
	
	if(stats[0] < 1)
		{
		PlayerRank[id] = RANK_CIVILIAN
	}
	if(stats[0] >= 1 && stats[0] <= 3)
		{
		PlayerRank[id] = RANK_PRIVATE
	}
	if(stats[0] >= 3)
		{
		PlayerRank[id] = RANK_MARSHALL
	}
	client_print(id,print_chat, "You are a %s with %s kills", RANKS[PlayerRank[id]], stats[0]);
	
	return 0
}
Thanks for any help you can give.
raa 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 06:48.


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