Zombie Escape Releases

Official Releases
Post Reply
User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#121

Post by Night Fury » 6 years ago

Raheem wrote: 6 years ago I don't know if the problem of hitting zombie that not infected solved yet or not. We will wait till anyone confirm that it's solved or not. Or you try as you have time.
I sold my time to my friend.
Do you want some time? 5H = 1€. :) :)
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#122

Post by sam_bhosale4 » 6 years ago

Raheem wrote: 6 years ago I don't know if the problem of hitting zombie that not infected solved yet or not. We will wait till anyone confirm that it's solved or not. Or you try as you have time.
ill check it with fresh hlds and will let u know if its solved or not soon!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#123

Post by johnnysins2000 » 6 years ago

Raheem wrote: 6 years ago I don't know if the problem of hitting zombie that not infected solved yet or not. We will wait till anyone confirm that it's solved or not. Or you try as you have time.
I will check it On my friend server since he also wants to Make an Zombie escape Server ... If he gets Bug I will notify
Nobody Is That Busy If They Make Time :roll:

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

#124

Post by Raheem » 6 years ago

Jack GamePlay wrote: 6 years ago I sold my time to my friend.
Do you want some time? 5H = 1€. :) :)
So i guess that your friend is stupied to hire noob like you :P...........
sam_bhosale4 wrote: 6 years ago ill check it with fresh hlds and will let u know if its solved or not soon!
johnnysins2000 wrote: 6 years ago I will check it On my friend server since he also wants to Make an Zombie escape Server ... If he gets Bug I will notify
I'am waiting your report men.
He who fails to plan is planning to fail

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

#125

Post by Raheem » 6 years ago

I have edited Extra-Item Manager and added a new native that needed. It's ze_get_item_id(const szItemName[])
This is important but i don't add it officially. You may use this native with this native:
ze_items_force_buy(id, itemid, ignorecost = false)

So if i need to give a player item and this item name is: ze_register_item("Fire Ak-47", 1)
  • "Fire Ak-47"
So it will be like:
  • ze_items_force_buy(id, ze_get_item_id("Fire Ak-47"), 1)
This will give the player a Fire Ak for free. You may use this in SupplyBox to give player weapon from extra-items if he picked up a supplybox.
johnnysins2000 Who suggested that. Nice.

Download:
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#126

Post by johnnysins2000 » 6 years ago

Nice now i will use it!
Nobody Is That Busy If They Make Time :roll:

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

#127

Post by Raheem » 6 years ago

johnnysins2000 wrote: 6 years ago Nice now i will use it!
Yeah brother it will be good with Supply BOX.
He who fails to plan is planning to fail

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

#128

Post by Raheem » 6 years ago

1-Some Fixes done in ze_resources.sma so now you will need to use the new one in the ZIP. There was problems in playing the sound it sometimes not complete to the end so the fix is for this problem.

2-New Native inserted in ze_items_manager.sma it's: ze_get_item_id(const szItemName[]). Example of using it:
    1. #include <zombie_escape>
    2.  
    3. public plugin_init()
    4. {
    5.     register_plugin("[ZE] Native Test", ZE_VERSION, AUTHORS)
    6.    
    7.     // Commands
    8.     register_clcmd("get", "Cmd_GiveFreeItem")
    9. }
    10.  
    11. public Cmd_GiveFreeItem(id)
    12. {
    13.     // This will give player Frost Nade For Free.
    14.     ze_force_buy_item(id, ze_get_item_id("Frost Nade"), 1)
    15. }
  • Name used in ze_get_item_id() comes from the main source of the extra-item form this native:
    g_iItemID = ze_register_item("Frost Nade", 10)
He who fails to plan is planning to fail

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

#129

Post by Night Fury » 6 years ago

This is my request to everyone.
Whether the bug (which is both teams can't damage each others) is fixed or no:
If you're server owner, do your best to make your server full & test several rounds & maps.
If you're test/making mod on lan server, add fake players/bots & test several maps & rounds.

I've been testing with fake players for about 30 min & i didn't get that bug.
If you got it, notice me.

ArMaGeDDoN
sam_bhosale4
czirimbolo
johnnysins2000
Raheem
Spir0x
Whoever i didn't mention, test & tell me result whether you got the bug or no.
Good luck.

Code:
  1. #include <zombie_escape>
  2.  
  3. // Fowards
  4. enum _:TOTAL_FORWARDS
  5. {
  6.     FORWARD_NONE = 0,
  7.     FORWARD_ROUNDEND,
  8.     FORWARD_HUMANIZED,
  9.     FORWARD_INFECTED,
  10.     FORWARD_ZOMBIE_APPEAR,
  11.     FORWARD_ZOMBIE_RELEASE,
  12.     FORWARD_GAME_STARTED
  13. }
  14.  
  15. new g_iForwards[TOTAL_FORWARDS], g_iFwReturn, g_iTeam
  16.  
  17. // Tasks IDs
  18. enum
  19. {
  20.     TASK_COUNTDOWN = 1100,
  21.     TASK_COUNTDOWN2,
  22.     TASK_SCORE_MESSAGE,
  23.     FREEZE_ZOMBIES,
  24.     ROUND_TIME_LEFT
  25. }
  26.  
  27. // Variables
  28. new g_iCTNum, g_iTNum, g_iRoundTime, g_iCountDown, g_iReleaseNotice, g_iMaxClients, g_iHumansScore, g_iZombiesScore,
  29. bool:g_bGameStarted, bool:g_bIsZombie[33], bool:g_bIsZombieFrozen[33], bool:g_bZombieFrozenTime,
  30. Float:g_fReferenceTime
  31.  
  32. // Cvars
  33. new Cvar_Human_fSpeedFactor, Cvar_Human_fGravity, Cvar_Human_iHealth, Cvar_Zombie_fSpeed, Cvar_Zombie_fGravity,
  34. Cvar_Zombie_iReleaseTime, Cvar_iFreezeTime, Cvar_fRoundTime, Cvar_iReqPlayers, Cvar_Zombie_iHealth, Cvar_FirstZombies_iHealth,
  35. Cvar_Zombie_fKnockback, Cvar_ScoreMessage_iType, Cvar_ScoreMessage_iRed, Cvar_ScoreMessage_iGreen, Cvar_ScoreMessage_iBlue
  36.  
  37. public plugin_natives()
  38. {
  39.     register_native("ze_is_user_zombie", "native_ze_is_user_zombie", 1)
  40.     register_native("ze_set_user_zombie", "native_ze_set_user_zombie", 1)
  41.     register_native("ze_set_user_human", "native_ze_set_user_human", 1)
  42.     register_native("ze_get_release_time", "native_ze_get_release_time", 1)
  43. }
  44.  
  45. public plugin_init()
  46. {
  47.     register_plugin("[ZE] Core/Engine", ZE_VERSION, AUTHORS)
  48.    
  49.     // Hook Chains
  50.     //RegisterHookChain(RG_CBasePlayer_TraceAttack, "Fw_TraceAttack_Pre", 0)
  51.     //RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 1)
  52.     RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_PlayerSpawn_Post", 1)
  53.     RegisterHookChain(RG_CSGameRules_CheckWinConditions, "Fw_CheckMapConditions_Post", 1)
  54.     RegisterHookChain(RG_CBasePlayer_Killed, "Fw_PlayerKilled_Post", 1)
  55.    
  56.     // Events
  57.     register_event("HLTV", "New_Round", "a", "1=0", "2=0")
  58.     register_event("TextMsg", "Map_Restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in", "2=#Round_Draw")
  59.     register_logevent("Round_Start", 2, "1=Round_Start")
  60.     register_logevent("Round_End", 2, "1=Round_End")
  61.    
  62.     // Hams
  63.     RegisterHam(Ham_Item_PreFrame, "player", "Fw_RestMaxSpeed_Post", 1)
  64.     RegisterHam(Ham_TraceAttack, "player", "Fw_TraceAttack")
  65.     RegisterHam(Ham_TakeDamage, "player", "Fw_TakeDamage_Post", 1)
  66.    
  67.     // Create Forwards (All Return Values Ignored)
  68.     g_iForwards[FORWARD_ROUNDEND] = CreateMultiForward("ze_roundend", ET_IGNORE, FP_CELL)
  69.     g_iForwards[FORWARD_HUMANIZED] = CreateMultiForward("ze_user_humanized", ET_IGNORE, FP_CELL)
  70.     g_iForwards[FORWARD_INFECTED] = CreateMultiForward("ze_user_infected", ET_IGNORE, FP_CELL, FP_CELL)
  71.     g_iForwards[FORWARD_ZOMBIE_APPEAR] = CreateMultiForward("ze_zombie_appear", ET_IGNORE)
  72.     g_iForwards[FORWARD_ZOMBIE_RELEASE] = CreateMultiForward("ze_zombie_release", ET_IGNORE)
  73.     g_iForwards[FORWARD_GAME_STARTED] = CreateMultiForward("ze_game_started", ET_IGNORE)
  74.    
  75.     // Hud Messages
  76.     g_iReleaseNotice = CreateHudSyncObj()
  77.    
  78.     // Sequential files (.txt)
  79.     register_dictionary("zombie_escape.txt")
  80.    
  81.     // Humans Cvars
  82.     Cvar_Human_fSpeedFactor = register_cvar("ze_human_speed_factor", "20.0")
  83.     Cvar_Human_fGravity = register_cvar("ze_human_gravity", "1.0")
  84.     Cvar_Human_iHealth = register_cvar("ze_human_health", "1000")
  85.    
  86.     // Zombie Cvars
  87.     Cvar_Zombie_fSpeed = register_cvar("ze_zombie_speed", "350.0")
  88.     Cvar_Zombie_fGravity = register_cvar("ze_zombie_gravity", "0.8")
  89.     Cvar_Zombie_iHealth = register_cvar("ze_zombie_health", "10000")
  90.     Cvar_FirstZombies_iHealth = register_cvar("ze_first_zombies_health", "20000")
  91.     Cvar_Zombie_fKnockback = register_cvar("ze_zombie_knockback", "300.0")
  92.    
  93.     // General Cvars
  94.     Cvar_Zombie_iReleaseTime = register_cvar("ze_release_time", "15")
  95.     Cvar_iFreezeTime = register_cvar("ze_freeze_time", "20")
  96.     Cvar_fRoundTime = register_cvar("ze_round_time", "9.0")
  97.     Cvar_iReqPlayers = register_cvar("ze_required_players", "2")
  98.     Cvar_ScoreMessage_iType = register_cvar("ze_score_message_type", "1")
  99.     Cvar_ScoreMessage_iRed = register_cvar("ze_score_message_red", "200")
  100.     Cvar_ScoreMessage_iGreen = register_cvar("ze_score_message_green", "100")
  101.     Cvar_ScoreMessage_iBlue = register_cvar("ze_score_message_blue", "0")
  102.    
  103.     // Default Values
  104.     g_bGameStarted = false
  105.    
  106.     // Static Values
  107.     g_iMaxClients = get_member_game(m_nMaxPlayers)
  108.    
  109.     // Check Round Time to Terminate it
  110.     set_task(1.0, "Check_RoundTimeleft", ROUND_TIME_LEFT, _, _, "b")
  111. }
  112.  
  113. public plugin_cfg()
  114. {
  115.     // Get our configiration file and Execute it
  116.     new szCfgDir[64]
  117.     get_localinfo("amxx_configsdir", szCfgDir, charsmax(szCfgDir))
  118.     server_cmd("exec %s/zombie_escape.cfg", szCfgDir)
  119. }
  120.  
  121. public Fw_CheckMapConditions_Post()
  122. {
  123.     // Block Game Commencing
  124.     set_member_game(m_bGameStarted, true)
  125.    
  126.     // Set Freeze Time
  127.     set_member_game(m_iIntroRoundTime, get_pcvar_num(Cvar_iFreezeTime))
  128.    
  129.     // Set Round Time
  130.     set_member_game(m_iRoundTime, floatround(get_pcvar_float(Cvar_fRoundTime) * 60.0))
  131.    
  132.     // Set Game Name
  133.     new szGameName[64]
  134.     formatex(szGameName, sizeof(szGameName), "Zombie Escape v%s", ZE_VERSION)
  135.     set_member_game(m_GameDesc, szGameName)
  136. }
  137.  
  138. public Fw_PlayerKilled_Post(id)
  139. {
  140.     new iCTNum; iCTNum = GetAlivePlayersNum(CsTeams:TEAM_CT)
  141.     new iTNum; iTNum = GetAlivePlayersNum(CsTeams:TEAM_TERRORIST)
  142.    
  143.     if (iCTNum == 0 && iTNum == 0)
  144.     {
  145.         // No Winner, All Players in one team killed Or Both teams Killed
  146.         client_print(0, print_center, "%L", LANG_PLAYER, "NO_WINNER")
  147.     }
  148. }
  149.  
  150. public Fw_RestMaxSpeed_Post(id)
  151. {
  152.     if (!g_bIsZombie[id])
  153.     {
  154.         static Float:fMaxSpeed
  155.         pev(id, pev_maxspeed, fMaxSpeed)
  156.        
  157.         if(fMaxSpeed != 1.0 && is_user_alive(id))
  158.         {
  159.             // Set Human Speed Factor
  160.             set_pev(id, pev_maxspeed, fMaxSpeed + get_pcvar_float(Cvar_Human_fSpeedFactor))
  161.         }
  162.         return HAM_IGNORED
  163.     }
  164.     return HAM_SUPERCEDE
  165. }
  166.  
  167. public Fw_PlayerSpawn_Post(id)
  168. {  
  169.     if (!g_bGameStarted)
  170.     {
  171.         // Force All player to be Humans if Game not started yet
  172.         Set_User_Human(id)
  173.         //rg_set_user_team(id, TEAM_CT, MODEL_UNASSIGNED)
  174.     }
  175.     else
  176.     {
  177.         if (get_member_game(m_bFreezePeriod))
  178.         {
  179.             // Respawn Him As human if we are in freeze time (Zombie Not Chosen yet)
  180.             Set_User_Human(id)
  181.         }
  182.         else
  183.         {
  184.             if (g_bZombieFrozenTime)
  185.             {
  186.                 // Zombie Chosen and zombies Frozen, Spawn him as zombie and Freeze Him
  187.                 Set_User_Zombie(id)
  188.                 g_bIsZombieFrozen[id] = true
  189.                 set_pev(id, pev_maxspeed, 1.0)
  190.             }
  191.             else
  192.             {
  193.                 // Respawn him as normal zombie
  194.                 Set_User_Zombie(id)
  195.             }
  196.         }
  197.     }
  198. }
  199.  
  200. public New_Round()
  201. {
  202.     // Remove All tasks in the New Round
  203.     remove_task(TASK_COUNTDOWN)
  204.     remove_task(TASK_COUNTDOWN2)
  205.     remove_task(TASK_SCORE_MESSAGE)
  206.     remove_task(FREEZE_ZOMBIES)
  207.    
  208.     // Score Message Task
  209.     set_task(10.0, "Score_Message", TASK_SCORE_MESSAGE, _, _, "b")
  210.    
  211.     // 2 is Hardcoded Value, It's Fix for the countdown to work correctly
  212.     g_iCountDown = get_member_game(m_iIntroRoundTime) - 2
  213.    
  214.     if (!g_bGameStarted)
  215.     {
  216.         // No Enough Players
  217.         ze_colored_print(0, "%L", LANG_PLAYER, "NO_ENOUGH_PLAYERS", get_pcvar_num(Cvar_iReqPlayers))
  218.         return // Block the execution of the blew code
  219.     }
  220.    
  221.     if (g_bGameStarted)
  222.     {
  223.         // Game Already started, Countdown now started
  224.         set_task(1.0, "Countdown_Start", TASK_COUNTDOWN, _, _, "b")
  225.         ze_colored_print(0, "%L", LANG_PLAYER, "READY_TO_RUN")
  226.         ExecuteForward(g_iForwards[FORWARD_GAME_STARTED], g_iFwReturn)
  227.     }
  228. }
  229.  
  230. // Score Message Task
  231. public Score_Message(TaskID)
  232. {
  233.     if (get_pcvar_num(Cvar_ScoreMessage_iType) == 0)
  234.         return
  235.    
  236.     if (get_pcvar_num(Cvar_ScoreMessage_iType) == 1)
  237.     {
  238.         set_dhudmessage(get_pcvar_num(Cvar_ScoreMessage_iRed), get_pcvar_num(Cvar_ScoreMessage_iGreen), get_pcvar_num(Cvar_ScoreMessage_iBlue), -1.0, 0.01, 0, 0.0, 9.0)
  239.         show_dhudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
  240.     }
  241.     else if (get_pcvar_num(Cvar_ScoreMessage_iType) == 2)
  242.     {
  243.         set_hudmessage(get_pcvar_num(Cvar_ScoreMessage_iRed), get_pcvar_num(Cvar_ScoreMessage_iGreen), get_pcvar_num(Cvar_ScoreMessage_iBlue), -1.0, 0.01, 0, 0.0, 9.0)
  244.         show_hudmessage(0, "%L", LANG_PLAYER, "SCORE_MESSAGE", g_iZombiesScore, g_iHumansScore)
  245.     }
  246. }
  247.  
  248. public Countdown_Start(TaskID)
  249. {
  250.     // Check if the players Disconnected and there is only one player then remove all messages, and stop tasks
  251.     if (!g_bGameStarted)
  252.         return
  253.    
  254.     if (!g_iCountDown) // When it reach 0 the !0 will be 1 So it's True
  255.     {
  256.         Choose_Zombies()
  257.         remove_task(TaskID) // Remove the task
  258.         return // Block the execution of the blew code
  259.     }
  260.    
  261.     set_hudmessage(random(256), random(256), random(256), -1.0, 0.21, 0, 2.0, 2.0)
  262.     show_hudmessage(0, "%L", LANG_PLAYER, "RUN_NOTICE", g_iCountDown)
  263.  
  264.     g_iCountDown -- // Means: g_iCountDown = g_iCountDown -1
  265. }
  266.  
  267. public Choose_Zombies()
  268. {
  269.     new iZombies, id, AliveCount; AliveCount  = GetAllAlivePlayersNum()
  270.     new iReqZombies; iReqZombies = RequiredZombies()
  271.    
  272.     while (iZombies < iReqZombies)
  273.     {
  274.         id = GetRandomAlive(random_num(1, AliveCount))
  275.        
  276.         if (!is_user_alive(id) || g_bIsZombie[id])
  277.             continue
  278.  
  279.         Set_User_Zombie(id)
  280.         set_user_health(id, get_pcvar_num(Cvar_FirstZombies_iHealth))
  281.         g_bIsZombieFrozen[id] = true
  282.         g_bZombieFrozenTime = true
  283.         set_pev(id, pev_maxspeed, 1.0)
  284.         set_task(0.1, "Freeze_Zombies", FREEZE_ZOMBIES, _, _, "b") // Better than PreThink
  285.         ExecuteForward(g_iForwards[FORWARD_ZOMBIE_APPEAR], g_iFwReturn)
  286.         iZombies ++
  287.     }
  288.    
  289.     // 2 is Hardcoded Value, It's Fix for the countdown to work correctly
  290.     g_iCountDown = get_pcvar_num(Cvar_Zombie_iReleaseTime) - 2
  291.    
  292.     set_task(1.0, "ReleaseZombie_CountDown", TASK_COUNTDOWN2, _, _, "b")
  293. }
  294.  
  295. public ReleaseZombie_CountDown(TaskID)
  296. {
  297.     if(!g_iCountDown)
  298.     {
  299.         ReleaseZombie()
  300.         remove_task(TaskID)
  301.        
  302.         return
  303.     }
  304.    
  305.     // Release Hud Message
  306.     set_hudmessage(255, 255, 0, -1.0, 0.21, 1, 2.0, 2.0)
  307.     ShowSyncHudMsg(0, g_iReleaseNotice, "%L", LANG_PLAYER, "ZOMBIE_RELEASE", g_iCountDown)
  308.    
  309.     g_iCountDown --
  310. }
  311.  
  312. public ReleaseZombie()
  313. {
  314.     ExecuteForward(g_iForwards[FORWARD_ZOMBIE_RELEASE], g_iFwReturn)
  315.    
  316.     for(new i = 1; i <= g_iMaxClients; i++)
  317.     {
  318.         if(is_user_alive(i) && g_bIsZombie[i])
  319.         {
  320.             g_bIsZombieFrozen[i] = false
  321.             g_bZombieFrozenTime = false
  322.         }
  323.     }
  324. }
  325.  
  326. public Freeze_Zombies(TaskID)
  327. {
  328.     for(new i = 1; i <= g_iMaxClients; i++)
  329.     {
  330.         if(!is_user_alive(i))
  331.             continue
  332.        
  333.         if (g_bIsZombieFrozen[i] && g_bIsZombie[i])
  334.         {
  335.             // Zombie & Frozen then Freeze him
  336.             set_pev(i, pev_maxspeed, 1.0)
  337.         }
  338.        
  339.         if (!g_bIsZombieFrozen[i] && g_bIsZombie[i])
  340.         {
  341.             // Zombie but Not Frozen the set his speed form .cfg
  342.             set_pev(i, pev_maxspeed, get_pcvar_float(Cvar_Zombie_fSpeed))
  343.         }
  344.     }
  345. }
  346. /*
  347. public Fw_TraceAttack_Pre(iVictim, iAttacker, Float:damage, Float:direction[3], tracehandle, damagebits)
  348. {
  349.     if (iVictim == iAttacker || !is_user_connected(iVictim) || !is_user_connected(iAttacker))
  350.         return HC_CONTINUE
  351.    
  352.     // Attacker and Victim is in same teams? Skip here only
  353.     if (get_member(iAttacker, m_iTeam) == get_member(iVictim, m_iTeam))
  354.         return HC_CONTINUE
  355.    
  356.     // In freeze time? Skip all other plugins
  357.     if (g_bIsZombieFrozen[iAttacker])
  358.         return HC_CONTINUE
  359.        
  360.     if(g_bIsZombieFrozen[iVictim])
  361.         return HC_SUPERCEDE
  362.    
  363.     g_iCTNum = GetAlivePlayersNum(CsTeams:TEAM_CT)
  364.    
  365.     //if (get_member(iAttacker, m_iTeam) == TEAM_TERRORIST)
  366.     if (g_bIsZombie[iAttacker])
  367.     {
  368.         Set_User_Zombie(iVictim)
  369.         ExecuteForward(g_iForwards[FORWARD_INFECTED], g_iFwReturn, iVictim, iAttacker)
  370.        
  371.         if (g_iCTNum == 1) // Check if this is Last Human, Because of Delay i can't check if it's 0 instead of 1
  372.         {
  373.             // Zombie Win, Leave text blank so we use ours from ML
  374.             rg_round_end(3.0, WINSTATUS_TERRORISTS, ROUND_TERRORISTS_WIN, "")
  375.            
  376.             // Show Our Message
  377.             client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_FAIL")
  378.            
  379.             // This needed so forward work also to add +1 for Zombies
  380.             g_iTeam = 1 // ZE_TEAM_ZOMBIE
  381.             ExecuteForward(g_iForwards[FORWARD_ROUNDEND], g_iFwReturn, g_iTeam)
  382.         }
  383.     }
  384.     return HC_CONTINUE
  385. }
  386.  
  387. public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType)
  388. {
  389.     // Not Vaild Victim or Attacker so skip the event (Important to block out bounds errors)
  390.     if (!is_user_connected(iVictim) || !is_user_connected(iAttacker))
  391.         return HC_CONTINUE
  392.    
  393.     // Set Knockback here, So if we blocked damage in TraceAttack event player won't get knockback (Fix For Madness)
  394.     if (g_bIsZombie[iVictim] && !g_bIsZombie[iAttacker])
  395.     {
  396.         // Remove Shock
  397.         set_pdata_float(iVictim, 108, 1.0)
  398.        
  399.         // Set Knockback
  400.         static Float:fOrigin[3]
  401.         pev(iAttacker, pev_origin, fOrigin)
  402.         Set_Knockback(iVictim, fOrigin, get_pcvar_float(Cvar_Zombie_fKnockback), 2)
  403.     }
  404.     return HC_CONTINUE
  405. }*/
  406.  
  407. public Fw_TraceAttack(iVictim, iAttacker)
  408. {
  409.     if (iVictim == iAttacker || !is_user_connected(iVictim) || !is_user_alive(iAttacker))
  410.         return HAM_IGNORED
  411.        
  412.     // Attacker and Victim is in same teams? Skip here only
  413.     if(get_member(iAttacker, m_iTeam) == get_member(iVictim, m_iTeam))
  414.         return HAM_IGNORED
  415.        
  416.     if(g_bIsZombie[iAttacker] == g_bIsZombie[iVictim])
  417.         return HAM_SUPERCEDE
  418.    
  419.     // In freeze time? Skip all other plugins
  420.     if (g_bIsZombieFrozen[iAttacker] || g_bIsZombieFrozen[iVictim])
  421.         return HAM_SUPERCEDE
  422.        
  423.     return HAM_IGNORED
  424. }
  425.  
  426. public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker)
  427. {
  428.     if (iVictim == iAttacker || !is_user_connected(iVictim) || !is_user_alive(iAttacker))
  429.         return HAM_IGNORED
  430.        
  431.     // Attacker and Victim is in same teams? Skip here only
  432.     if(get_member(iAttacker, m_iTeam) == get_member(iVictim, m_iTeam))
  433.         return HAM_IGNORED
  434.        
  435.     // Zombie is attacker & Human is victim
  436.     if (g_bIsZombie[iAttacker] && !g_bIsZombie[iVictim])
  437.     {
  438.         Set_User_Zombie(iVictim)
  439.         ExecuteForward(g_iForwards[FORWARD_INFECTED], g_iFwReturn, iVictim, iAttacker)
  440.        
  441.         if (GetAlivePlayersNum(CsTeams:TEAM_CT) == 0) // Check if this is Last Human, Because of Delay i can't check if it's 0 instead of 1
  442.         {
  443.             // Zombie Win, Leave text blank so we use ours from ML
  444.             rg_round_end(3.0, WINSTATUS_TERRORISTS, ROUND_TERRORISTS_WIN, "")
  445.            
  446.             // Show Our Message
  447.             client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_FAIL")
  448.            
  449.             // This needed so forward work also to add +1 for Zombies
  450.             g_iTeam = 1 // ZE_TEAM_ZOMBIE
  451.             ExecuteForward(g_iForwards[FORWARD_ROUNDEND], g_iFwReturn, g_iTeam)
  452.         }
  453.     }
  454.     // Set Knockback here, So if we blocked damage in TraceAttack event player won't get knockback (Fix For Madness)
  455.     else if (g_bIsZombie[iVictim] && !g_bIsZombie[iAttacker])
  456.     {
  457.         // Remove Shock
  458.         set_pdata_float(iVictim, 108, 1.0)
  459.        
  460.         // Set Knockback
  461.         static Float:fOrigin[3]
  462.         pev(iAttacker, pev_origin, fOrigin)
  463.         Set_Knockback(iVictim, fOrigin, get_pcvar_float(Cvar_Zombie_fKnockback), 2)
  464.     }
  465.     return HAM_IGNORED
  466. }
  467.  
  468. public Round_End()
  469. {
  470.     if (GetAlivePlayersNum(CsTeams:TEAM_TERRORIST) == 0) // If no zombies // Exexcute blew code
  471.     {
  472.         g_iTeam = 2 // ZE_TEAM_HUMAN
  473.         ExecuteForward(g_iForwards[FORWARD_ROUNDEND], g_iFwReturn, g_iTeam)
  474.         client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_SUCCESS")
  475.         g_iHumansScore ++
  476.         return // To block Execute the code blew
  477.     }
  478.    
  479.     g_iTeam = 1 // ZE_TEAM_ZOMBIE
  480.     g_iZombiesScore ++
  481.     ExecuteForward(g_iForwards[FORWARD_ROUNDEND], g_iFwReturn, g_iTeam)
  482.     client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_FAIL")
  483. }
  484.  
  485. public Round_Start()
  486. {
  487.     g_fReferenceTime = get_gametime()
  488.     g_iRoundTime = get_member_game(m_iRoundTime)
  489. }
  490.  
  491. public Check_RoundTimeleft()
  492. {
  493.     new fRoundTimeLeft; fRoundTimeLeft = floatround((g_fReferenceTime + float(g_iRoundTime)) - get_gametime())
  494.    
  495.     if (fRoundTimeLeft == 0)
  496.     {
  497.         // If Time is Out the Terminate the Round
  498.         rg_round_end(3.0, WINSTATUS_TERRORISTS, ROUND_TERRORISTS_WIN, "")
  499.        
  500.         // Show our Message
  501.         client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_FAIL")
  502.     }
  503. }
  504.  
  505. public client_disconnect(id)
  506. {
  507.     // Delay Then Check Players to Terminate The round (Delay needed)
  508.     set_task(0.1, "Check_AlivePlayers", _, _, _, "a", 1)
  509. }
  510.  
  511. // This check done when player disconnect
  512. public Check_AlivePlayers()
  513. {
  514.     g_iTNum = GetAlivePlayersNum(CsTeams:TEAM_TERRORIST)
  515.     g_iCTNum = GetAlivePlayersNum(CsTeams:TEAM_CT)
  516.    
  517.     // Game Started? (There is at least 2 players Alive?)
  518.     if (g_bGameStarted)
  519.     {
  520.         // We are in freeze time?
  521.         if (get_member_game(m_bFreezePeriod))
  522.         {
  523.             // Humans alive number = 1 and no zombies?
  524.             if (g_iCTNum == 1 && g_iTNum == 0)
  525.             {
  526.                 // Game started false again
  527.                 g_bGameStarted = false
  528.             }
  529.         }
  530.         else // Not freeze time?
  531.         {
  532.             // Humans number =1 and no zombies?
  533.             if (g_iCTNum == 1 && g_iTNum == 0)
  534.             {
  535.                 // Game started is false and humans wins (Escape Success)
  536.                 g_bGameStarted = false
  537.                 rg_round_end(3.0, WINSTATUS_CTS, ROUND_CTS_WIN, "")
  538.                 client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_SUCCESS")
  539.             }
  540.            
  541.             // Zombies Number = 1 and no Humans?
  542.             if (g_iTNum == 1 && g_iCTNum == 0)
  543.             {
  544.                 // Game started false and zombies win (Escape Fail)
  545.                 g_bGameStarted = false
  546.                 rg_round_end(3.0, WINSTATUS_TERRORISTS, ROUND_TERRORISTS_WIN, "")
  547.                 client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_FAIL")
  548.             }
  549.            
  550.             // Humans number more than 1 and no zombies?
  551.             if (g_iCTNum > 1 && g_iTNum == 0)
  552.             {
  553.                 // Then Escape success as there is no Zombies
  554.                 rg_round_end(3.0, WINSTATUS_CTS, ROUND_CTS_WIN, "")
  555.                 client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_SUCCESS")
  556.             }
  557.            
  558.             // Zombies number more than 1 and no humans?
  559.             if (g_iTNum > 1 && g_iCTNum == 0)
  560.             {
  561.                 // Then Escape Fail as there is no humans
  562.                 rg_round_end(3.0, WINSTATUS_TERRORISTS, ROUND_TERRORISTS_WIN, "")
  563.                 client_print(0, print_center, "%L", LANG_PLAYER, "ESCAPE_FAIL")
  564.             }
  565.         }
  566.     }
  567. }
  568.  
  569. public client_putinserver(id)
  570. {
  571.     // Add Delay and Check Conditions To start the Game (Delay needed)
  572.     set_task(1.0, "Check_AllPlayersNumber", _, _, _, "b")
  573. }
  574.  
  575. public Check_AllPlayersNumber(TaskID)
  576. {
  577.     if (g_bGameStarted)
  578.     {
  579.         // If game started remove the task and block the blew Checks
  580.         remove_task(TaskID)
  581.         return
  582.     }
  583.        
  584.     if (GetAllAlivePlayersNum() < get_pcvar_num(Cvar_iReqPlayers))
  585.         return
  586.    
  587.     // Simple Fix for bots, If many of them connect fast then the == 2 won't be detected so this to detect it
  588.     if (!g_bGameStarted)
  589.     {
  590.         g_bGameStarted = true
  591.     }
  592.    
  593.     // Players In server == The Required so game started is true
  594.     g_bGameStarted = true
  595.        
  596.     // Restart the game
  597.     server_cmd("sv_restart 2")
  598.        
  599.     // Print Fake game Commencing Message
  600.     client_print(0, print_center, "%L", LANG_PLAYER, "START_GAME")
  601.        
  602.     // Remove the task
  603.     remove_task(TaskID)
  604. }
  605.  
  606. public Set_User_Human(id)
  607. {
  608.     if (!is_user_alive(id))
  609.         return
  610.        
  611.     if (get_member(id, m_iTeam) != TEAM_CT)
  612.         rg_set_user_team(id, TEAM_CT, MODEL_UNASSIGNED)
  613.    
  614.     g_bIsZombie[id] = false
  615.     set_user_gravity(id, get_pcvar_float(Cvar_Human_fGravity))
  616.     set_user_health(id, get_pcvar_num(Cvar_Human_iHealth))
  617.     ExecuteForward(g_iForwards[FORWARD_HUMANIZED], g_iFwReturn, id)
  618. }
  619.  
  620. public Set_User_Zombie(id)
  621. {
  622.     if (!is_user_alive(id))
  623.         return
  624.    
  625.     if (get_member(id, m_iTeam) != TEAM_TERRORIST)
  626.         rg_set_user_team(id, TEAM_TERRORIST, MODEL_UNASSIGNED)
  627.        
  628.     g_bIsZombie[id] = true
  629.     set_user_health(id, get_pcvar_num(Cvar_Zombie_iHealth))
  630.     set_user_gravity(id, get_pcvar_float(Cvar_Zombie_fGravity))
  631.     rg_remove_all_items(id)
  632.     rg_give_item(id, "weapon_knife")
  633.     ExecuteForward(g_iForwards[FORWARD_INFECTED], g_iFwReturn, id, 0)
  634. }
  635.  
  636. public Map_Restart()
  637. {
  638.     // Add Delay To help Rest Scores if player kill himself, and there no one else him so round draw (Delay needed)
  639.     set_task(0.1, "Rest_Score_Message", _, _, _, "a", 1)
  640. }
  641.  
  642. public Rest_Score_Message()
  643. {
  644.     g_iHumansScore = 0
  645.     g_iZombiesScore = 0
  646. }
  647.  
  648. // Natives
  649. public native_ze_is_user_zombie(id)
  650. {
  651.     return g_bIsZombie[id]
  652. }
  653.  
  654. public native_ze_set_user_zombie(id)
  655. {
  656.     Set_User_Zombie(id)
  657. }
  658.  
  659. public native_ze_set_user_human(id)
  660. {
  661.     Set_User_Human(id)
  662. }
  663.  
  664. public native_ze_get_release_time()
  665. {
  666.     return get_pcvar_num(Cvar_Zombie_iReleaseTime)
  667. }
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:

#130

Post by Raheem » 6 years ago

Good step jack, I'll do many tests when get time and tell you if i get this or not. If we don't get again so problem from the ReAPI we will report the reapi team if it's true.
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#131

Post by johnnysins2000 » 6 years ago

Raheem wrote: 6 years ago Good step jack, I'll do many tests when get time and tell you if i get this or not. If we don't get again so problem from the ReAPI we will report the reapi team if it's true.
ahah i got this bug for the first time with jack's code!
Here is the picture as proof
  • hl 2017-06-08 16-07-58-97.png
Nobody Is That Busy If They Make Time :roll:

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#132

Post by johnnysins2000 » 6 years ago

And Another Report! I tested it with Raheem's update code in his addons.zip

i did not got the problem again after 45 mins testing!
Nobody Is That Busy If They Make Time :roll:

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

#133

Post by Raheem » 6 years ago

Johnny, This with core jack posted you get it again?
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#134

Post by johnnysins2000 » 6 years ago

Raheem wrote: 6 years ago Johnny, This with core jack posted you get it again?
yes with the core which jack posted i got it ! (tested 30 mins , GOT IT 2 TIMES)

but when i tested with your core i did not get it ! (tested 45 mins . GOT IT 0 TIMES)
Nobody Is That Busy If They Make Time :roll:

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

#135

Post by Raheem » 6 years ago

Oh, So jack's try come to fail. So let's assume that the core in the pack don't have this problem till one report it again with this core.
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#136

Post by johnnysins2000 » 6 years ago

Raheem wrote: 6 years ago Oh, So jack's try come to fail. So let's assume that the core in the pack don't have this problem till one report it again with this core.
We need more members testing both cores ... and report it to get this problem clear!
Nobody Is That Busy If They Make Time :roll:

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

#137

Post by Night Fury » 6 years ago

Nevermind...Last core (by Raheem) is the fixed 1..Mine was yay ignore it.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#138

Post by sam_bhosale4 » 6 years ago

Raheem is it updated again? the core?
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#139

Post by johnnysins2000 » 6 years ago

sam_bhosale4 wrote: 6 years ago Raheem is it updated again? the core?
yes... just download the addons.zip and use ze_Core.sma from there
Nobody Is That Busy If They Make Time :roll:

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#140

Post by sam_bhosale4 » 6 years ago

johnnysins2000 wrote: 6 years ago
sam_bhosale4 wrote: 6 years ago Raheem is it updated again? the core?
yes... just download the addons.zip and use ze_Core.sma from there
not added amxx? not compiled yet?
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
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 0 guests