AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hide target info in Status Text (https://forums.alliedmods.net/showthread.php?t=74881)

hleV 07-26-2008 15:39

Hide target info in Status Text
 
Hello. I want to hide the info of the player you're aiming at. But only for a certain team.
I know it will affect hostage etc. but it's OK for me.

So, let's say if:
CT is aiming at CT = true.
CT is aiming at T = true.
T is aiming at CT = true.
T is aiming at T = false (hides name and hp).

PHP Code:

#include <amxmodx>
 
public plugin_init() 
        
register_message(get_user_msgid("StatusText"), "msgStatusText")
 
public 
msgStatusText()
{
        
// If T is looking at T = handled. Else - continue.


Or if it's hard enough or impossible then at least hide info for Ts but show for CTs (Ts wont see info of neither T or CT). I've tried this myself but unsuccessfuly.
Thanks.

hzqst 07-26-2008 23:46

Re: Hide target info in Status Text
 
-_-
you can create a new status text(blank) when a T see his teammates

hleV 07-27-2008 18:47

Re: Hide target info in Status Text
 
Quote:

Originally Posted by hzqst (Post 659540)
-_-
you can create a new status text(blank) when a T see his teammates

Yes I can. But I need help with the code.

scrtxxcaz 07-28-2008 02:26

Re: Hide target info in Status Text
 
I believe this would work to check and see who is aiming at who

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <engine>
#define TEAM_T 1
#define TEAM_CT 2
public client_PreThink(id) {
      new 
AimerID,AimedAtID,bodypart,distance
      get_user_aiming
(AimerID,AimedAtID,bodypart,distance)
      if(
get_user_team(AimerID) == TEAM_T && get_user_team(AimedAtID) ==      TEAM_T)
      {
            
//a T aiming at another T
      
}



hleV 07-28-2008 07:49

Re: Hide target info in Status Text
 
Thanks. After some editions I've finally made it work.


All times are GMT -4. The time now is 05:37.

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