Raised This Month: $12 Target: $400
 3% 

Edit StatusValue (aiming at player info) ? Possible ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thEsp
BANNED
Join Date: Aug 2017
Old 02-21-2019 , 15:38   Edit StatusValue (aiming at player info) ? Possible ?
Reply With Quote #1

Hi, I want to edit the text displayed when you aim at players or hostages by using StatusValue (Since I want to keep the red/blue/yellow color)
I tried with some codes, but It messes up the message (displays a stupid text like "V:; xxxxx").
Took some info from https://wiki.alliedmods.net/Half-Lif...ts#StatusValue
This is code that I am running, I did not go further coding WHAT I EXACTLY NEEDED because at this point I don't know what I'm doing. Btw Compiles successfully.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "-"
#define VERSION "1.0"
#define AUTHOR "-"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("StatusValue","ShowPB","b")
}

public 
ShowPB(id)
{    
    
// so the edited text is like "Player : [%s] : Weapon : [%s]"
    
new msg2 get_user_msgid("StatusValue")
    
message_begin(MSG_ONE,msg2,_,id)
    
write_byte(2)
    
write_short(1)
    
message_end()

Thanks

Last edited by thEsp; 02-21-2019 at 15:41.
thEsp is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-21-2019 , 15:45   Re: Edit StatusValue (aiming at player info) ? Possible ?
Reply With Quote #2

https://www.amxmodx.org/api/messages/set_msg_arg_string

Register it as a message though.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
thEsp
BANNED
Join Date: Aug 2017
Old 02-21-2019 , 15:53   Re: Edit StatusValue (aiming at player info) ? Possible ?
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Thanks, I'll take a look at it.
thEsp is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 02-22-2019 , 11:49   Re: Edit StatusValue (aiming at player info) ? Possible ?
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=90685
PartialCloning is offline
Reply


Thread Tools
Display Modes

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 10:29.


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