Raised This Month: $32 Target: $400
 8% 

Players name for spectators


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
elantra86
Member
Join Date: Feb 2014
Old 03-25-2018 , 16:58   Players name for spectators
Reply With Quote #1

Hi. wanna create players info for spectators only - for 1st person, 3rd person(Free chase camera) and free look.

On free look spectator can see all players name over head. on 1st on 3rd too.
i found this plugin - but it shows info when aiming. need without aiming (
Thx in advance!

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Player Name Hud"
#define VERSION "1.0"
#define AUTHOR "Destroman"

const Float:HUD_STAT_X = -1.0;
const 
Float:HUD_STAT_Y 0.60;

new 
g_status_sync;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("StatusValue""showStatus""be""1=2""2!0");
    
register_event("StatusValue""hideStatus""be""1=1""2=0");
    
g_status_sync CreateHudSyncObj();
}

public 
showStatus(id)
{
    if (
is_user_connected(id))
    {
        new 
name[32], pid read_data(2);
        
get_user_name(pidname31);
        if (
is_user_alive(pid))
        {
            
set_hudmessage(25500HUD_STAT_XHUD_STAT_Y01.01.10.00.0, -1)
            
ShowSyncHudMsg(idg_status_sync"%s"name);

        }
    }
}
public 
hideStatus(id)
{
    
ClearSyncHud(idg_status_sync);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/ 
elantra86 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-25-2018 , 18:02   Re: Players name for spectators
Reply With Quote #2

Not possible.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
elantra86
Member
Join Date: Feb 2014
Old 03-26-2018 , 00:39   Re: Players name for spectators
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Not possible.
Why ?? And what do you think about this plugin ? https://forums.alliedmods.net/showthread.php?t=23691

On this plugin - can see players info - but from first look only.
elantra86 is offline
sb123
Senior Member
Join Date: Jan 2007
Old 03-26-2018 , 03:51   Re: Players name for spectators
Reply With Quote #4

PHP Code:
public plugin_init() {
    ..........
    
register_event("StatusValue","spec_target","bd","1=2")  //Observed object changes
    
register_event("SpecHealth2","spec_target","b")   //Observed object changes
    
register_event("TextMsg","spec_mode","b","2&#Spec_Mode"//Observation mode changes
    
..........
}

public 
spec_target(id){
    if (
id>0){
        new 
target=read_data(2)
        if(
target!=0){
            ..........    
//The target here records the id of the observed object
        
}
    }
}

public 
spec_mode(id){
    new 
specMode[12]
    
read_data(2,specMode,11)
    if(
equal(specMode,"#Spec_Mode4")){   //This is the first perspective
        
...........
        }else if(......){
        ...........
        }......{
        ...........
        }else{
        ...........
    }

__________________
sb123 is offline
Send a message via ICQ to sb123 Send a message via MSN to sb123 Send a message via Yahoo to sb123
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-26-2018 , 08:53   Re: Players name for spectators
Reply With Quote #5

Because there's no such thing as "dynamic text" in CS 1.6 that can be displayed over the player's head.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
elantra86
Member
Join Date: Feb 2014
Old 03-27-2018 , 08:57   Re: Players name for spectators
Reply With Quote #6

Quote:
Originally Posted by sb123 View Post
PHP Code:
public plugin_init() {
    ..........
    
register_event("StatusValue","spec_target","bd","1=2")  //Observed object changes
    
register_event("SpecHealth2","spec_target","b")   //Observed object changes
    
register_event("TextMsg","spec_mode","b","2&#Spec_Mode"//Observation mode changes
    
..........
}

public 
spec_target(id){
    if (
id>0){
        new 
target=read_data(2)
        if(
target!=0){
            ..........    
//The target here records the id of the observed object
        
}
    }
}

public 
spec_mode(id){
    new 
specMode[12]
    
read_data(2,specMode,11)
    if(
equal(specMode,"#Spec_Mode4")){   //This is the first perspective
        
...........
        }else if(......){
        ...........
        }......{
        ...........
        }else{
        ...........
    }

dont understand your code (( - what u mean ........... ? can u give full code plz ?
elantra86 is offline
elantra86
Member
Join Date: Feb 2014
Old 03-27-2018 , 10:27   Re: Players name for spectators
Reply With Quote #7

maybe hud message and dhud message ?
elantra86 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-28-2018 , 04:07   Re: Players name for spectators
Reply With Quote #8

Its possible but you need to do some calculations to print a dhud msg on the spectator screen thinking its on the playerhead.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 22:51.


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