AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Targetinfo Hns (https://forums.alliedmods.net/showthread.php?t=189966)

mattiiias93 07-13-2012 07:58

Targetinfo Hns
 
Why didn't Enemy: Name work? When i play i can see friend but no enemy hud. Can someone fix it?


new target, body;
get_user_aiming(plr, target, body, 9999);

if( 0 < target <= g_MaxPlayers && g_bAlive[target] )
{
new CsTeams:targetTeam = cs_get_user_team(target);
if( semiclip == 2 || targetTeam == team )
{
new sName[32];
get_user_name(target, sName, 31);

new sMessage[64];
if( targetTeam == team )
{
formatex(sMessage, 63, "Friend: %s Health: %i", sName, get_user_health(target));
}
else
{
formatex(sMessage, 63, "Enemy: %s", sName, get_user_health(target));
}

if( targetTeam == CS_TEAM_CT )
{
set_hudmessage(0, 63, 127, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1);
}
else if( targetTeam == CS_TEAM_T )
{
set_hudmessage(127, 0, 0, -1.0, -1.0, 0, 0.0, 0.1, 0.0, 0.0, -1);
}

show_hudmessage(plr, "%s", sMessage);
}
}
}
}

MokeN 07-17-2012 14:23

Re: Targetinfo Hns
 
Use PHP wraps;)

Aooka 07-17-2012 14:27

Re: Targetinfo Hns
 
get_user_aiming(plr, target, body, 9999);
9999 = Why do you choose this value ? lol

Take 128 it's better.

Exolent[jNr] 07-17-2012 14:45

Re: Targetinfo Hns
 
Quote:

Originally Posted by Aooka (Post 1752457)
get_user_aiming(plr, target, body, 9999);
9999 = Why do you choose this value ? lol

Take 128 it's better.

Do you even know what it does?
That value is the largest distance that get_user_aiming() will look.
128 is about 2-3 people away from you.
9999 works here because you can get wherever you are aiming in the map.

Aooka 07-17-2012 14:48

Re: Targetinfo Hns
 
Yes i know it, but I did not know he needed as much ... "space"

Exolent[jNr] 07-17-2012 14:49

Re: Targetinfo Hns
 
Quote:

Originally Posted by Aooka (Post 1752486)
Yes i know it, but I did not know he needed as much ... "space"

Just curious, why is 128 better than 9999?

Aooka 07-17-2012 14:52

Re: Targetinfo Hns
 
Not better you are right ... I misspoke

mattiiias93 07-22-2012 06:48

Re: Targetinfo Hns
 
Can you fix it aooka? or exolent please:D

ConnorMcLeod 07-22-2012 08:40

Re: Targetinfo Hns
 
Quote:

Originally Posted by mattiiias93 (Post 1755659)
Can you fix it aooka? or exolent please:D

Don't expect anything from aooka, he knows nothing and he is just confusing people.
aooka, last warning from me before i request a ban.

Doc-Holiday 07-22-2012 22:38

Re: Targetinfo Hns
 
Quote:

Originally Posted by Exolent[jNr] (Post 1752484)
Do you even know what it does?
That value is the largest distance that get_user_aiming() will look.
128 is about 2-3 people away from you.
9999 works here because you can get wherever you are aiming in the map.

curious about this... if you leave the param blank

PHP Code:

new Float:flAimingDistance get_user_aiming(idtargetbody); 

That seem to not restrict the distance. does that do the same as setting it to 9999? (In theory)


All times are GMT -4. The time now is 15:02.

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