Game Mode: Killer

Gameplay Addons
Post Reply
User avatar
lizoumapper
Senior Member
Senior Member
Morocco
Posts: 150
Joined: 10 Months Ago
Location: Morocco
Has thanked: 3 times
Been thanked: 7 times
Age: 17
Contact:

Game Mode: Killer

#1

Post by lizoumapper » 2 Months Ago

GameMode : Killer
Description :
This gamemode become all zombieis killer not infector become kill human.

Cvars :
ze_killer 1 // enable or disbale game mode killer
ze_killer_chance 15 // ratio chance to start game when appear zombie
ze_killer_hudinfo 1 // enable or disable show hud message when appear zombie
ze_killer_sound 1 // enable or disable sound when appear zombie

[!] Warning :
You enable sound want listen sound when appear zombie :
choose any sound but was extension .wav rename it ex : (killer.wav) and poste in {GAMEDIR}/cstrike/sound/zombie_escape/

[&] and

go file zombie_escape.txt located in{GAMEDIR}/cstrike/addons/amxmodx/data/lang/
open file and add this :

Code: Select all

GAMEMODE_KILLER = Killer Mode Started !
in any line

And Compile it :
  1. /*
  2.     This Game Mode all zombies not infect humans
  3.     all zombies become killer not infector . . .
  4. */
  5.  
  6. #include <zombie_escape>
  7.  
  8. #define GM_VERSION "1.0"
  9.  
  10. new bool:gkiller[33]
  11. new gCvar_Chance, gCvar_GM_Killer, gCvar_HudInfo, gCvar_Snd
  12. new gMaxPlayers
  13.  
  14. new Snd[][] =
  15. {
  16.     "zombie_escape/gm_killer.wav"
  17. }
  18.  
  19. public plugin_init()
  20. {
  21.     register_plugin("[ZE] Gamemode Killer", GM_VERSION, "LiZou Dev")
  22.    
  23.     register_event("HLTV", "New_Round", "a", "1=0", "2=0")
  24.    
  25.     gCvar_GM_Killer = register_cvar("ze_killer", "1")
  26.     gCvar_Chance = register_cvar("ze_killer_chance", "15")
  27.     gCvar_HudInfo = register_cvar("ze_killer_hudinfo", "1")
  28.     gCvar_Snd = register_cvar("ze_killer_sound", "1")
  29.    
  30.     register_dictionary("zombie_escape.txt")
  31.    
  32.     gMaxPlayers = get_maxplayers()
  33.    
  34. }
  35.  
  36. public New_Round(id)
  37. {
  38.     random_num(1, get_pcvar_num(gCvar_Chance) !=1)
  39.     {
  40.         gkiller[id] = true
  41.     }
  42. }
  43.  
  44. public ze_zombie_appear()
  45. {
  46.     for(new id;id < gMaxPlayers;id++)
  47.     {
  48.         set_task(0.5, "ze_zombie_killer", id)
  49.     }
  50. }
  51.  
  52. public ze_zombie_killer(iVictim, iInfector)
  53. {
  54.     for(new id;id < gMaxPlayers;id++)
  55.     {
  56.         if(gkiller[id] == true)
  57.         {
  58.             if(get_pcvar_num(gCvar_GM_Killer) == 1)
  59.             {
  60.                 if(iInfector == iVictim || !ze_is_user_zombie(iVictim))
  61.                     return
  62.                    
  63.                 user_silentkill(iVictim)
  64.            
  65.            
  66.                 if(get_pcvar_num(gCvar_HudInfo) == 1)
  67.                 {
  68.                     static LangHUD[64]
  69.                     formatex(LangHUD, charsmax(LangHUD), "%L", LANG_PLAYER, "GAMEMODE_KILLER")
  70.                     set_hudmessage(255, 255, 255, -1.0, -1.0, 1, 6.0, 5.0, 0.1, 1.5)
  71.                     show_hudmessage(id, LangHUD)
  72.                 }
  73.        
  74.                 if(get_pcvar_num(gCvar_Snd) == 1)
  75.                 {
  76.                     client_cmd(id, "spk %s", Snd)
  77.                 }
  78.             }
  79.         }
  80.     }
  81. }
Enjoy :)
I Love Learn Languages Programmations

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#2

Post by Muhammet20 » 2 Months Ago

nice
i will try after the first term ends
i mean for the school

[ Post made via Android ]
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests