Approved Frost M4A1

Zombies/Humans Extra-Items
User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2200
Joined: 4 Years Ago
Has thanked: 53 times
Been thanked: 161 times
Age: 24
Contact:

Frost M4A1

#1

Post by Raheem » 4 Years Ago

Frost M4A1

Description:
  • Extra-Item for Humans. I made this for ZP and i converted it to work with our Zombie Escape Mod. The zombie will get freeze after X damage you make with this gun. The code now is optimized and using ReAPI.
Cvars:
  • ze_freezing_m4a1_damage 2000 Damage required then zombie get freeze?
  • ze_multiplier_m4a1_damage 2 Multiple the Frost M4A1 Damage by? [Integer Factor, 1 or 2 and so on]
Installation & Instructions:
  • Simply install it like any plugin nothing new but don't forget to copy models and sprites.
  • Make sure to update your ze_frost.amxx plugin to final version posted in our releases section.
Screenshots:
  • ImageImageImageImageImage
Downloads:
Last edited by Raheem on 02 Aug 2017, 00:59, edited 3 times in total.
Reason: Fixed flood error.
These users thanked the author Raheem for the post:
Night Fury (4 Years Ago)
He who fails to plan is planning to fail

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2200
Joined: 4 Years Ago
Has thanked: 53 times
Been thanked: 161 times
Age: 24
Contact:

#2

Post by Raheem » 4 Years Ago

Fixed flood error as i was changing damage in take damage pre and it should be done in take damage post.
He who fails to plan is planning to fail

User avatar
Null
Member
Member
Saudi Arabia
Posts: 24
Joined: 7 Months Ago
Location: Saudi Arabia, Riyadh
Has thanked: 0
Been thanked: 2 times
Contact:

#3

Post by Null » 7 Months Ago

HI raheem add me on discord i want plugin from u
https://discord.gg/qVc4rhpsqT

User avatar
Z0uha1r_LK
Moderator
Moderator
Morocco
Posts: 342
Joined: 2 Years Ago
Location: Morocco
Has thanked: 92 times
Been thanked: 39 times
Age: 19
Contact:

#4

Post by Z0uha1r_LK » 7 Months Ago

Null wrote:
7 Months Ago
HI raheem add me on discord i want plugin from u
https://discord.gg/qVc4rhpsqT
What do you want ?

User avatar
Z0uha1r_LK
Moderator
Moderator
Morocco
Posts: 342
Joined: 2 Years Ago
Location: Morocco
Has thanked: 92 times
Been thanked: 39 times
Age: 19
Contact:

#5

Post by Z0uha1r_LK » 7 Months Ago

Null wrote:
7 Months Ago
HI raheem add me on discord i want plugin from u
https://discord.gg/qVc4rhpsqT
What do you want ?

User avatar
Z0uha1r_LK
Moderator
Moderator
Morocco
Posts: 342
Joined: 2 Years Ago
Location: Morocco
Has thanked: 92 times
Been thanked: 39 times
Age: 19
Contact:

#6

Post by Z0uha1r_LK » 7 Months Ago

I'm convert something in this lines to ReAPI and Fakemeta, I'm remove some natives Engine
  1. public Fw_SetModel(entity, model[])
  2. {
  3.    
  4.     if(!pev_valid(entity))
  5.         return FMRES_IGNORED
  6.  
  7.     if(!equali(model, W_OLD_M4A1_MODEL))
  8.         return FMRES_IGNORED
  9.  
  10.     new className[33]
  11.     get_entvar(entity, var_classname, className, charsmax(className))
  12.  
  13.     static iOwner, iStoredM4A1ID
  14.  
  15.     // Frost M4A1 Owner
  16.     iOwner = get_entvar(entity, var_owner)
  17.  
  18.     // Get drop weapon index (Frost M4A1) to use in fw_FrostM4A1AddToPlayer forward
  19.     iStoredM4A1ID = rg_find_ent_by_owner(NULLENT, "weapon_m4a1", entity)
  20.  
  21.     // If Player Has Frost M4A1 and It's weapon_m4a1
  22.     if(g_bHasFrostM4A1[iOwner] && pev_valid(iStoredM4A1ID))
  23.     {
  24.         // Setting weapon options
  25.         set_entvar(iStoredM4A1ID, var_impulse, 1997)
  26.  
  27.         // Rest Var
  28.         g_bHasFrostM4A1[iOwner] = false
  29.        
  30.         // Set weaponbox new model
  31.         engfunc(EngFunc_SetModel, entity, W_M4A1_MODEL)
  32.         return FMRES_SUPERCEDE
  33.     }
  34.     return FMRES_IGNORED
  35. }
  36.  
  37. public Fw_AddFrostM4A1ToPlayer(FrostM4A1, id)
  38. {
  39.     // Make sure that this is M4A1
  40.     if(pev_valid(FrostM4A1) && is_user_connected(id) && get_entvar(FrostM4A1, var_impulse) == 1997)
  41.     {
  42.         // Update Var
  43.         g_bHasFrostM4A1[id] = true
  44.  
  45.         // Reset weapon options
  46.         set_entvar(FrostM4A1, var_impulse, 0)
  47.         return HAM_HANDLED
  48.     }
  49.     return HAM_IGNORED
  50. }

User avatar
Null
Member
Member
Saudi Arabia
Posts: 24
Joined: 7 Months Ago
Location: Saudi Arabia, Riyadh
Has thanked: 0
Been thanked: 2 times
Contact:

#7

Post by Null » 7 Months Ago

I want a help plugins for ZE

User avatar
Null
Member
Member
Saudi Arabia
Posts: 24
Joined: 7 Months Ago
Location: Saudi Arabia, Riyadh
Has thanked: 0
Been thanked: 2 times
Contact:

#8

Post by Null » 7 Months Ago

I want a help plugins for ZE

User avatar
Null
Member
Member
Saudi Arabia
Posts: 24
Joined: 7 Months Ago
Location: Saudi Arabia, Riyadh
Has thanked: 0
Been thanked: 2 times
Contact:

#9

Post by Null » 7 Months Ago

Morocco nta ??

User avatar
Z0uha1r_LK
Moderator
Moderator
Morocco
Posts: 342
Joined: 2 Years Ago
Location: Morocco
Has thanked: 92 times
Been thanked: 39 times
Age: 19
Contact:

#10

Post by Z0uha1r_LK » 2 Months Ago

Update this hook in plugin.
  1. public Fw_SetModel(entity, model[])
  2. {
  3.    
  4.     if(!is_entity(entity))
  5.         return FMRES_IGNORED
  6.  
  7.     if(!equali(model, W_OLD_M4A1_MODEL))
  8.         return FMRES_IGNORED
  9.  
  10.     static iOwner, iStoredM4A1ID
  11.  
  12.     // Frost M4A1 Owner
  13.     iOwner = get_entvar(entity, var_owner)
  14.  
  15.     // Get drop weapon index (Frost M4A1) to use in fw_FrostM4A1AddToPlayer forward
  16.     rg_find_ent_by_owner(NULLENT, "weapon_m4a1", iStoredM4A1ID)
  17.  
  18.     // If Player Has Frost M4A1 and It's weapon_m4a1
  19.     if(g_bHasFrostM4A1[iOwner] && is_entity(iStoredM4A1ID))
  20.     {
  21.         // Setting weapon options
  22.         set_entvar(iStoredM4A1ID, var_impulse, 1997)
  23.  
  24.         // Rest Var
  25.         g_bHasFrostM4A1[iOwner] = false
  26.        
  27.         // Set weaponbox new model
  28.         set_entvar(entity, var_flags, FL_KILLME)
  29.         return FMRES_SUPERCEDE
  30.     }
  31.     return FMRES_IGNORED
  32. }
  33.  
  34. public Fw_AddFrostM4A1ToPlayer(FrostM4A1, id)
  35. {
  36.     // Make sure that this is M4A1
  37.     if(is_entity(FrostM4A1) && is_user_connected(id) && get_entvar(FrostM4A1, var_impulse) == 1997)
  38.     {
  39.         // Update Var
  40.         g_bHasFrostM4A1[id] = true
  41.  
  42.         // Reset weapon options
  43.         set_entvar(FrostM4A1, var_impulse, 0)
  44.         return HAM_HANDLED
  45.     }
  46.     return HAM_IGNORED
  47. }

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest