teNsk- , Upload the source of the one that make conflict with this one. I'll try find a way solving it for you.
@donii, Some of the code not written by me. I agree that To use set_user_rendering is better and faster than FakeMeta. This one used fm_set_rendering For entities may be there is fm_set_user_rendering this which should be used here anyway i think Fun is faster. I'll edit this and review the whole code again next Version.
bro here you go it has some bug like drop weapons as i said with other m4a1 and one more thing like human can't shoot him while zombie is froze with this m4a1 and thanks! and when i frost zombie with my frost nade zombie is moving little bit!
new M4A1_V_MODEL[64] = "models/v_Frost_m4a1.mdl" new M4A1_P_MODEL[64] = "models/p_Frost_m4a1.mdl"
new gc_itemID new bool:g_FrostM4A1[33] new g_FrozeN[33] new M4A1FrostSpr new g_msgScreenFade new g_iMaxPlayers new FrostTime new BackSpeed new m_spriteTexture new g_iDmg[33] new FreezeDamage
const UNIT_SECOND = (1<<12)
public plugin_init() { register_plugin("[ZP] Extra Item: Frost M4A1", "1.0", "Raheem")
public fw_PlayerPreThink(id) { // Not alive if (!is_user_alive(id)) return;
// Set Player MaxSpeed if (g_FrozeN[id]) { set_pev(id, pev_velocity, Float:{0.0,0.0,0.0}) // stop motion set_pev(id, pev_maxspeed, 1.0) // prevent from moving } else { { set_pev(id, pev_maxspeed, get_pcvar_float(BackSpeed)) // Change this in Cvar if you Want } } }
public FrostEffect(id) { // Only effect alive unfrozen zombies if (!is_user_alive(id) || !zp_get_user_zombie(id) || g_FrozeN[id]) return;
message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, id) write_short(UNIT_SECOND*1) // duration write_short(UNIT_SECOND*1) // hold time write_short(0x1000) // fade type write_byte(0) // red write_byte(50) // green write_byte(200) // blue write_byte(100) // alpha message_end()
new ent = create_entity("info_target") new Float:iOrigin[3] entity_get_vector(id, EV_VEC_origin, iOrigin) set_pev(ent, pev_body, 1) iOrigin[2] -= 35 entity_set_origin(ent, iOrigin) set_pev(ent, pev_owner, id); set_rendering(ent, kRenderFxNone, 255, 255, 255, kRenderTransAdd, 255)
i remove the m4a1 golden and other but it has one problem when i buy m4a1 right then someone make me zombie so after that i take antidote and its like normal m4a1 is frost m4a1
1-Used now set_user_rendering. [Thanks to DoNii] 2-Fixed when Zombie Take Anti-Dote he find that normal M4A1 become Forst M4A1. [Thanks to Walle] 3-Added new Effect for Laser it's Lightning. [Thanks to Walle]