Available show lvl

Unpaid Requests, Public Plugins
Post Reply
User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

show lvl

#1

Post by sPe3doN » 5 years ago

hello
can any one add to center name show lvl and XP like in pic
Image
Image

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#2

Post by Night Fury » 5 years ago

That message can not be edited.
But we can make another message.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#3

Post by Raheem » 5 years ago

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.
He who fails to plan is planning to fail

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#4

Post by sPe3doN » 5 years ago

Jack GamePlay wrote: 5 years ago That message can not be edited.
But we can make another message.
like this Image :shock: :shock:
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#5

Post by Raheem » 5 years ago

Here:
    1. #include <zombie_escape>
    2. #include <ze_levels>
    3.  
    4. new g_iMsgStatusText
    5.  
    6. public plugin_init()
    7. {
    8.     register_plugin("Target Info", "1.0", "Raheem")
    9.    
    10.     // Messages
    11.     register_message(get_user_msgid("StatusValue"), "StatusValue_Message" )
    12.     g_iMsgStatusText = get_user_msgid("StatusText")
    13. }
    14.  
    15. /*
    16. *   Name:       StatusValue
    17. *
    18. *   Structure:  byte    Flag
    19. *               short   Value
    20. */
    21. public StatusValue_Message(iMsgid, iDest, id)
    22. {
    23.     new iFlag, iValue;
    24.    
    25.     // For Flag: 1 is TeamRelation, 2 is PlayerID, and 3 is Health
    26.     iFlag  = get_msg_arg_int(1)
    27.     iValue = get_msg_arg_int(2)
    28.    
    29.     // If flag is player id
    30.     if (iFlag == 2)
    31.     {
    32.         // In this case iValue contain id of player you are aiming at
    33.         new iAimTarget = iValue
    34.        
    35.         new szMessage[101]
    36.        
    37.         // Get the target name
    38.         //new szName[32]
    39.         //get_user_name(iAimTarget, szName, charsmax(szName))
    40.        
    41.         if (!is_user_connected(id) || !is_user_connected(iAimTarget))
    42.             return;
    43.        
    44.         // The two layers in same team - %%p2 gets player name
    45.         if (get_member(iAimTarget, m_iTeam) == get_member(id, m_iTeam)) // id is the player who aim
    46.         {
    47.             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))
    48.         }
    49.         else
    50.         {
    51.             formatex(szMessage, charsmax(szMessage), "1 %%p2")
    52.         }
    53.        
    54.         // Send the message
    55.         Send_Status_Message(id, szMessage)
    56.     }
    57. }
    58.  
    59. /*
    60. *   Stock to send status message.
    61. *   Text must be formatted before it sent to this stock.
    62. */
    63. stock Send_Status_Message(const id, const szMessage[])
    64. {
    65.     message_begin(MSG_ONE_UNRELIABLE, g_iMsgStatusText, _, id)
    66.     write_byte(0)
    67.     write_string(szMessage)
    68.     message_end()
    69. }
Screenshots:
  • Enemy.png
    Friend.png
He who fails to plan is planning to fail

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#6

Post by sPe3doN » 5 years ago

Raheem wrote: 5 years ago Here:
    1. #include <zombie_escape>
    2. #include <ze_levels>
    3.  
    4. new g_iMsgStatusText
    5.  
    6. public plugin_init()
    7. {
    8.     register_plugin("Target Info", "1.0", "Raheem")
    9.    
    10.     // Messages
    11.     register_message(get_user_msgid("StatusValue"), "StatusValue_Message" )
    12.     g_iMsgStatusText = get_user_msgid("StatusText")
    13. }
    14.  
    15. /*
    16. *   Name:       StatusValue
    17. *
    18. *   Structure:  byte    Flag
    19. *               short   Value
    20. */
    21. public StatusValue_Message(iMsgid, iDest, id)
    22. {
    23.     new iFlag, iValue;
    24.    
    25.     // For Flag: 1 is TeamRelation, 2 is PlayerID, and 3 is Health
    26.     iFlag  = get_msg_arg_int(1)
    27.     iValue = get_msg_arg_int(2)
    28.    
    29.     // If flag is player id
    30.     if (iFlag == 2)
    31.     {
    32.         // In this case iValue contain id of player you are aiming at
    33.         new iAimTarget = iValue
    34.        
    35.         new szMessage[101]
    36.        
    37.         // Get the target name
    38.         //new szName[32]
    39.         //get_user_name(iAimTarget, szName, charsmax(szName))
    40.        
    41.         if (!is_user_connected(id) || !is_user_connected(iAimTarget))
    42.             return;
    43.        
    44.         // The two layers in same team - %%p2 gets player name
    45.         if (get_member(iAimTarget, m_iTeam) == get_member(id, m_iTeam)) // id is the player who aim
    46.         {
    47.             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))
    48.         }
    49.         else
    50.         {
    51.             formatex(szMessage, charsmax(szMessage), "1 %%p2")
    52.         }
    53.        
    54.         // Send the message
    55.         Send_Status_Message(id, szMessage)
    56.     }
    57. }
    58.  
    59. /*
    60. *   Stock to send status message.
    61. *   Text must be formatted before it sent to this stock.
    62. */
    63. stock Send_Status_Message(const id, const szMessage[])
    64. {
    65.     message_begin(MSG_ONE_UNRELIABLE, g_iMsgStatusText, _, id)
    66.     write_byte(0)
    67.     write_string(szMessage)
    68.     message_end()
    69. }
Screenshots:
  • Enemy.pngFriend.png
Cool thx raheem :D
Image

Post Reply

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

Register

Sign in

Who is online

Users browsing this forum: No registered users and 3 guests