Raised This Month: $ Target: $400
 0% 

Need help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
3.14 zdec
New Member
Join Date: Aug 2011
Old 08-13-2011 , 09:38   Need help
Reply With Quote #1

I need this plugin to show info to teammates.
Please help.
Code:
#include <amxmodx>
#include <cstrike>
#include <csx>

#pragma semicolon 1

new g_FriendOnly;

public plugin_init( )
{
	register_plugin("Player Info", "0.1", "3.14 zdec");
	
	g_FriendOnly = register_cvar("aim_friendonly", "1");
	
	register_event("StatusValue", "EventStatusValue", "b", "1>0", "2>0");
}

public EventStatusValue(const id)
{
	new sName[32], sWpnName[32], iClip, iAmmo, iType = read_data(1), iData = read_data(2);
	new iWpnID = get_user_weapon(iData, iClip, iAmmo);
	get_user_name(iData, sName, 31);

	if(iWpnID)
	{
		xmod_get_wpnname(iWpnID, sWpnName, 31);
	}
	
	if(iType == 3 || !g_FriendOnly && iType == 1) return;

	if(cs_get_user_team(iData) == CS_TEAM_T)
	{
		set_hudmessage(255, 0, 0, -1.0, 0.59, 0, 2.0, 2.0);
		show_hudmessage(id,"%s ^nHealth: %d ^nArmor: %d ^nWeapon: %s", sName, get_user_health(iData), get_user_armor(iData), sWpnName);
	}
	if(cs_get_user_team(iData) == CS_TEAM_CT)
	{
		set_hudmessage(0, 128, 255, -1.0, 0.59, 0, 2.0, 2.0);
		show_hudmessage(id,"%s ^nHealth: %d ^nArmor: %d ^nWeapon: %s", sName, get_user_health(iData), get_user_armor(iData), sWpnName);
	}
}
Attached Files
File Type: sma Get Plugin or Get Source (player_info.sma - 556 views - 1.1 KB)
3.14 zdec is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 08-13-2011 , 11:17   Re: Need help
Reply With Quote #2

cs_get_user_team(iData) == CS_TEAM_T

change to

cs_get_user_team(iData) == cs_get_user_team(id)

delete the second check and then change the colors
Backstabnoob is offline
3.14 zdec
New Member
Join Date: Aug 2011
Old 08-13-2011 , 15:26   Re: Need help
Reply With Quote #3

Thanks much, for your help.
But i still misunderstand, how to make two colours in one check.
Please, could you tell me more clearly?
3.14 zdec is offline
Reply



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 03:19.


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