show lvl
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
That message can not be edited.
But we can make another message.
But we can make another message.
Maybe this: viewtopic.php?f=15&t=81?
If you need it same as in the pic, we will disable the original one and reformat new one with what you need to show when player aim.
If you need it same as in the pic, we will disable the original one and reformat new one with what you need to show when player aim.
He who fails to plan is planning to fail
like this
Here:
- #include <zombie_escape>
- #include <ze_levels>
- new g_iMsgStatusText
- public plugin_init()
- {
- register_plugin("Target Info", "1.0", "Raheem")
- // Messages
- register_message(get_user_msgid("StatusValue"), "StatusValue_Message" )
- g_iMsgStatusText = get_user_msgid("StatusText")
- }
- /*
- * Name: StatusValue
- *
- * Structure: byte Flag
- * short Value
- */
- public StatusValue_Message(iMsgid, iDest, id)
- {
- new iFlag, iValue;
- // For Flag: 1 is TeamRelation, 2 is PlayerID, and 3 is Health
- iFlag = get_msg_arg_int(1)
- iValue = get_msg_arg_int(2)
- // If flag is player id
- if (iFlag == 2)
- {
- // In this case iValue contain id of player you are aiming at
- new iAimTarget = iValue
- new szMessage[101]
- // Get the target name
- //new szName[32]
- //get_user_name(iAimTarget, szName, charsmax(szName))
- if (!is_user_connected(id) || !is_user_connected(iAimTarget))
- return;
- // The two layers in same team - %%p2 gets player name
- if (get_member(iAimTarget, m_iTeam) == get_member(id, m_iTeam)) // id is the player who aim
- {
- formatex(szMessage, charsmax(szMessage), "1 %%p2 -- Health: %d / Level: %d / Escape Coins: %d", get_user_health(iAimTarget), ze_get_user_level(iAimTarget), ze_get_escape_coins(iAimTarget))
- }
- else
- {
- formatex(szMessage, charsmax(szMessage), "1 %%p2")
- }
- // Send the message
- Send_Status_Message(id, szMessage)
- }
- }
- /*
- * Stock to send status message.
- * Text must be formatted before it sent to this stock.
- */
- stock Send_Status_Message(const id, const szMessage[])
- {
- message_begin(MSG_ONE_UNRELIABLE, g_iMsgStatusText, _, id)
- write_byte(0)
- write_string(szMessage)
- message_end()
- }
He who fails to plan is planning to fail
Cool thx raheemRaheem wrote: ↑5 years ago Here:Screenshots:
#include <zombie_escape> #include <ze_levels> new g_iMsgStatusText public plugin_init() { register_plugin("Target Info", "1.0", "Raheem") // Messages register_message(get_user_msgid("StatusValue"), "StatusValue_Message" ) g_iMsgStatusText = get_user_msgid("StatusText") } /* * Name: StatusValue * * Structure: byte Flag * short Value */ public StatusValue_Message(iMsgid, iDest, id) { new iFlag, iValue; // For Flag: 1 is TeamRelation, 2 is PlayerID, and 3 is Health iFlag = get_msg_arg_int(1) iValue = get_msg_arg_int(2) // If flag is player id if (iFlag == 2) { // In this case iValue contain id of player you are aiming at new iAimTarget = iValue new szMessage[101] // Get the target name //new szName[32] //get_user_name(iAimTarget, szName, charsmax(szName)) if (!is_user_connected(id) || !is_user_connected(iAimTarget)) return; // The two layers in same team - %%p2 gets player name if (get_member(iAimTarget, m_iTeam) == get_member(id, m_iTeam)) // id is the player who aim { formatex(szMessage, charsmax(szMessage), "1 %%p2 -- Health: %d / Level: %d / Escape Coins: %d", get_user_health(iAimTarget), ze_get_user_level(iAimTarget), ze_get_escape_coins(iAimTarget)) } else { formatex(szMessage, charsmax(szMessage), "1 %%p2") } // Send the message Send_Status_Message(id, szMessage) } } /* * Stock to send status message. * Text must be formatted before it sent to this stock. */ stock Send_Status_Message(const id, const szMessage[]) { message_begin(MSG_ONE_UNRELIABLE, g_iMsgStatusText, _, id) write_byte(0) write_string(szMessage) message_end() }
- Enemy.pngFriend.png
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 3 guests