View Single Post
Ognjen7
Junior Member
Join Date: Nov 2015
Old 01-03-2021 , 07:04   Re: BaseBuilder PlayerInfo
Reply With Quote #8

Code:
public ev_ShowStatus(id) //called when id looks at someone
{
	new name[32], pid = read_data(2);
	new stats[8],bodyhits[8]
	
	get_user_name(pid, name, 31);
	new color1 = 0, color2 = 0;

	if (get_user_team(pid) == 1)
		color1 = 255;
	else
		color2 = 255;

	new Float:height=0.35
	//height=0.60

	if (g_friend[id] == 1)	// friend
	{
		new clip, ammo, wpnid = get_user_weapon(pid, clip, ammo);
		new wpnname[32];

		if (wpnid)
			xmod_get_wpnname(wpnid, wpnname, 31);

		new rank = get_user_stats(pid, stats, bodyhits)
		
		if(g_iszombie[id])
		{
			set_hudmessage(color1, 50, color2, -1.0, height, 1, 0.01, 3.0, 0.01, 0.01);
			ShowSyncHudMsg(id, gHudSyncInfo, "> ZOMBIE <^n%L", LANG_SERVER, "PLAYER_INFO1", name, rank, get_user_health(pid), wpnname);
		}
		else if(g_ishuman[id])
		{
			set_hudmessage(color1, 50, color2, -1.0, height, 1, 0.01, 3.0, 0.01, 0.01);
			ShowSyncHudMsg(id, gHudSyncInfo, "> HUMAN <^n%L", LANG_SERVER, "PLAYER_INFO1", name, rank, get_user_health(pid), wpnname);
		}
			
	} 
	if (g_friend[id] != 1) //enemy
	{
		new rank = get_user_stats(pid, stats, bodyhits)
		
		if(g_iszombie[id])
		{
			set_hudmessage(color1, 50, color2, -1.0, height, 1, 0.01, 3.0, 0.01, 0.01);
			ShowSyncHudMsg(id, gHudSyncInfo,"> ZOMBIE <^n%L", LANG_SERVER, "PLAYER_INFO2", name, rank);
		}
		else if(g_ishuman[id])
		{
			set_hudmessage(color1, 50, color2, -1.0, height, 1, 0.01, 3.0, 0.01, 0.01);
			ShowSyncHudMsg(id, gHudSyncInfo,"> HUMAN <^n%L", LANG_SERVER, "PLAYER_INFO2", name, rank);
		}
	}
}
I guess this is what you want ?
Just in case I added it in both. If something is wrong let me know.
Ognjen7 is offline