Win msg

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

Win msg

#1

Post by sPe3doN » 5 years ago

Hello
Rheem can you made msg show for humans when they win like this
X humans win you have got x frags
if we say there is 15 humans escape and my lvl 25
15 humans win you have got 25 frags
Image

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

#2

Post by Raheem » 5 years ago

The base plugin here: viewtopic.php?f=17&t=3402

  1. #include <zombie_escape>
  2. #include <ze_levels>
  3.  
  4. // Variables
  5. new g_iMaxClients
  6.  
  7. // Cvars
  8. new g_pCvarHumanInfectedFrags,
  9.     g_pCvarEscapeSuccessFrags,
  10.     g_pCvarInfectionDeaths
  11.  
  12. public plugin_init()
  13. {
  14.     register_plugin("[ZE] Frags Awards/Death Effects", ZE_VERSION, AUTHORS)
  15.    
  16.     // Cvars
  17.     g_pCvarHumanInfectedFrags = register_cvar("ze_human_infected_frags", "1")
  18.     g_pCvarInfectionDeaths = register_cvar("ze_infection_deaths", "1")
  19.     g_pCvarEscapeSuccessFrags = register_cvar("ze_escape_success_frags", "3")
  20.    
  21.     // Static Values
  22.     g_iMaxClients = get_member_game(m_nMaxPlayers)
  23. }
  24.  
  25. public ze_user_infected(iVictim, iInfector)
  26. {
  27.     if (iInfector == 0) // Block Awards for Zombies Chosen by the Server
  28.         return
  29.    
  30.     // Award Zombie Who infected, And Increase Deaths of the infected human
  31.     UpdateFrags(iInfector, iVictim, get_pcvar_num(g_pCvarHumanInfectedFrags), get_pcvar_num(g_pCvarInfectionDeaths), 1)
  32.    
  33.     // Adding Infection icon on Victim Screen
  34.     InfectionIcon(iVictim)
  35.    
  36.     // Fix Dead Attribute (Delay needed)
  37.     set_task(0.1, "Fix_DeadAttrib", _, _, _, "a", 6)
  38. }
  39.  
  40. public ze_roundend(WinTeam)
  41. {
  42.     if (WinTeam == ZE_TEAM_HUMAN)
  43.     {
  44.         new iAliveCTNum
  45.        
  46.         for (new i = 1; i <= g_iMaxClients; i++)
  47.         {
  48.             // Skip All Dead Players or Zombies
  49.             if (!is_user_alive(i) || get_member(i, m_iTeam) == TEAM_TERRORIST)
  50.                 continue
  51.            
  52.             // + Frags for All humans Who are Alive
  53.             UpdateFrags(i, 0, ze_get_user_level(i), 0, 1)
  54.            
  55.             iAliveCTNum = GetAlivePlayersNum(CsTeams:TEAM_CT)
  56.            
  57.             ze_colored_print(i, "!g%i !tHumans Win!y! !tYou have got !g%i !tfrags!y!", iAliveCTNum, ze_get_user_level(i))
  58.         }
  59.     }
  60. }
  61.  
  62. public Fix_DeadAttrib()
  63. {
  64.     for (new i = 1; i <= g_iMaxClients; i++)
  65.     {
  66.         // Skip All Dead And Humans
  67.         if (!is_user_alive(i) || get_member(i, m_iTeam) == TEAM_CT)
  68.             continue
  69.        
  70.         // Fix the Dead Attribute
  71.         FixDeadAttrib(i)
  72.     }
  73. }

Set this cvar to 0 if needed: ze_earn_chat_notice 0 (Coins System earn notice)
He who fails to plan is planning to fail

User avatar
Luxurious
Mod Tester
Mod Tester
Egypt
Posts: 177
Joined: 6 years ago
Location: Egypt
Contact:

#3

Post by Luxurious » 5 years ago

Raheem wrote: 5 years ago The base plugin here: viewtopic.php?f=17&t=3402

  1. #include <zombie_escape>
  2. #include <ze_levels>
  3.  
  4. // Variables
  5. new g_iMaxClients
  6.  
  7. // Cvars
  8. new g_pCvarHumanInfectedFrags,
  9.     g_pCvarEscapeSuccessFrags,
  10.     g_pCvarInfectionDeaths
  11.  
  12. public plugin_init()
  13. {
  14.     register_plugin("[ZE] Frags Awards/Death Effects", ZE_VERSION, AUTHORS)
  15.    
  16.     // Cvars
  17.     g_pCvarHumanInfectedFrags = register_cvar("ze_human_infected_frags", "1")
  18.     g_pCvarInfectionDeaths = register_cvar("ze_infection_deaths", "1")
  19.     g_pCvarEscapeSuccessFrags = register_cvar("ze_escape_success_frags", "3")
  20.    
  21.     // Static Values
  22.     g_iMaxClients = get_member_game(m_nMaxPlayers)
  23. }
  24.  
  25. public ze_user_infected(iVictim, iInfector)
  26. {
  27.     if (iInfector == 0) // Block Awards for Zombies Chosen by the Server
  28.         return
  29.    
  30.     // Award Zombie Who infected, And Increase Deaths of the infected human
  31.     UpdateFrags(iInfector, iVictim, get_pcvar_num(g_pCvarHumanInfectedFrags), get_pcvar_num(g_pCvarInfectionDeaths), 1)
  32.    
  33.     // Adding Infection icon on Victim Screen
  34.     InfectionIcon(iVictim)
  35.    
  36.     // Fix Dead Attribute (Delay needed)
  37.     set_task(0.1, "Fix_DeadAttrib", _, _, _, "a", 6)
  38. }
  39.  
  40. public ze_roundend(WinTeam)
  41. {
  42.     if (WinTeam == ZE_TEAM_HUMAN)
  43.     {
  44.         new iAliveCTNum
  45.        
  46.         for (new i = 1; i <= g_iMaxClients; i++)
  47.         {
  48.             // Skip All Dead Players or Zombies
  49.             if (!is_user_alive(i) || get_member(i, m_iTeam) == TEAM_TERRORIST)
  50.                 continue
  51.            
  52.             // + Frags for All humans Who are Alive
  53.             UpdateFrags(i, 0, ze_get_user_level(i), 0, 1)
  54.            
  55.             iAliveCTNum = GetAlivePlayersNum(CsTeams:TEAM_CT)
  56.            
  57.             ze_colored_print(i, "!g%i !tHumans Win!y! !tYou have got !g%i !tfrags!y!", iAliveCTNum, ze_get_user_level(i))
  58.         }
  59.     }
  60. }
  61.  
  62. public Fix_DeadAttrib()
  63. {
  64.     for (new i = 1; i <= g_iMaxClients; i++)
  65.     {
  66.         // Skip All Dead And Humans
  67.         if (!is_user_alive(i) || get_member(i, m_iTeam) == TEAM_CT)
  68.             continue
  69.        
  70.         // Fix the Dead Attribute
  71.         FixDeadAttrib(i)
  72.     }
  73. }

Set this cvar to 0 if needed: ze_earn_chat_notice 0 (Coins System earn notice)
When Some one level 1 will win then will get 1 frags for 3?
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015

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

#4

Post by Raheem » 5 years ago

Not get you, what you mean?
He who fails to plan is planning to fail

User avatar
Luxurious
Mod Tester
Mod Tester
Egypt
Posts: 177
Joined: 6 years ago
Location: Egypt
Contact:

#5

Post by Luxurious » 5 years ago

this message not work Humans Win! You have got frags!
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015

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

#6

Post by Raheem » 5 years ago

Luxurious wrote: 5 years ago this message not work Humans Win! You have got frags!
Still not working for you?
He who fails to plan is planning to fail

User avatar
Luxurious
Mod Tester
Mod Tester
Egypt
Posts: 177
Joined: 6 years ago
Location: Egypt
Contact:

#7

Post by Luxurious » 5 years ago

not working yet !
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015

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

#8

Post by Raheem » 5 years ago

Can you tell me which is not working? It's not giving the right frags or the message? Explain in details.

Try recompile and installing latest levels system and check.
He who fails to plan is planning to fail

User avatar
Luxurious
Mod Tester
Mod Tester
Egypt
Posts: 177
Joined: 6 years ago
Location: Egypt
Contact:

#9

Post by Luxurious » 5 years ago

frags is working 100%
but when escape success this simple message not show ..!
DRK Zombie-Escape V1.6
IP : 81.169.153.129:27015

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

#10

Post by Night Fury » 5 years ago

  1. #include <zombie_escape>
  2. #include <ze_levels>
  3.  
  4. // Variables
  5. new g_iMaxClients
  6.  
  7. // Cvars
  8. new g_pCvarHumanInfectedFrags,
  9.     g_pCvarEscapeSuccessFrags,
  10.     g_pCvarInfectionDeaths
  11.  
  12. public plugin_init()
  13. {
  14.     register_plugin("[ZE] Frags Awards/Death Effects", ZE_VERSION, AUTHORS)
  15.    
  16.     // Cvars
  17.     g_pCvarHumanInfectedFrags = register_cvar("ze_human_infected_frags", "1")
  18.     g_pCvarInfectionDeaths = register_cvar("ze_infection_deaths", "1")
  19.     g_pCvarEscapeSuccessFrags = register_cvar("ze_escape_success_frags", "3")
  20.    
  21.     // Static Values
  22.     g_iMaxClients = get_member_game(m_nMaxPlayers)
  23. }
  24.  
  25. public ze_user_infected(iVictim, iInfector)
  26. {
  27.     if (iInfector == 0) // Block Awards for Zombies Chosen by the Server
  28.         return
  29.    
  30.     // Award Zombie Who infected, And Increase Deaths of the infected human
  31.     UpdateFrags(iInfector, iVictim, get_pcvar_num(g_pCvarHumanInfectedFrags), get_pcvar_num(g_pCvarInfectionDeaths), 1)
  32.    
  33.     // Adding Infection icon on Victim Screen
  34.     InfectionIcon(iVictim)
  35.    
  36.     // Fix Dead Attribute (Delay needed)
  37.     set_task(0.1, "Fix_DeadAttrib", _, _, _, "a", 6)
  38. }
  39.  
  40. public ze_roundend(WinTeam)
  41. {
  42.     if (WinTeam == ZE_TEAM_HUMAN)
  43.     {
  44.         new i, iAliveCTNum = GetAlivePlayersNum(CsTeams:TEAM_CT)
  45.        
  46.         for (i = 1; i <= g_iMaxClients; i++)
  47.         {
  48.             // Skip All Dead Players or Zombies
  49.             if (!is_user_alive(i) || ze_is_user_zombie(i))
  50.                 continue
  51.            
  52.             // + Frags for All humans Who are Alive
  53.             UpdateFrags(i, 0, ze_get_user_level(i), 0, 1)
  54.            
  55.             ze_colored_print(i, "!g%i !tHumans Win!y! !tYou have got !g%i !tfrags!y!", iAliveCTNum, ze_get_user_level(i))
  56.         }
  57.     }
  58. }
  59.  
  60. public Fix_DeadAttrib()
  61. {
  62.     for (new i = 1; i <= g_iMaxClients; i++)
  63.     {
  64.         // Skip All Dead And Humans
  65.         if (!is_user_alive(i) || !ze_is_user_zombie(i))
  66.             continue
  67.        
  68.         // Fix the Dead Attribute
  69.         FixDeadAttrib(i)
  70.     }
  71. }
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:

#11

Post by Raheem » 5 years ago

+ Message should show only for alive Humans. You should be alive Human to see it.
He who fails to plan is planning to fail

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 5 guests