AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Edit StatusValue (aiming at player info) ? Possible ? (https://forums.alliedmods.net/showthread.php?t=314491)

thEsp 02-21-2019 15:38

Edit StatusValue (aiming at player info) ? Possible ?
 
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) https://i.imgur.com/ni8XcCm.png
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 :bee:

OciXCrom 02-21-2019 15:45

Re: Edit StatusValue (aiming at player info) ? Possible ?
 
https://www.amxmodx.org/api/messages/set_msg_arg_string

Register it as a message though.

thEsp 02-21-2019 15:53

Re: Edit StatusValue (aiming at player info) ? Possible ?
 
Quote:

Originally Posted by OciXCrom (Post 2640485)

Thanks, I'll take a look at it.

PartialCloning 02-22-2019 11:49

Re: Edit StatusValue (aiming at player info) ? Possible ?
 
https://forums.alliedmods.net/showthread.php?t=90685


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

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