Jump to content

Cristian505

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cristian505

  • Rank
    Membru nou

Personal Information

  • Server preferat
    CS.OLDGODS.RO

Recent Profile Visitors

55 profile views
  1. Cristian505

    Salut! Daca apas pe iconita de facebook ma redirectioneaza spre pagina ta sau avoastra de fb dar daca apas pe cea de youtube sau instagram tot pe fb ma redirectioneaza.
  2. Cristian505

    Of nu ma lasa sa schimb titlul... Nu conteaza. Sper sa va placa :)
  3. Cristian505

    Nume Plugin: Dual Uzi Autor: Cristian505 (Eu) Versiunea: 1.0 Comenzi: /du in chat pentru a primii arma Cvar/Setare: //Settings new const WEAPON_REFERENCE[] = "weapon_mac10"; #define WEAPON_CSW CSW_MAC10 #define WEAPON_MAX_CLIP 30 #define RECOIL 0.7 #define WEAPON_RATE 0.1 #define WEAPON_DAMAGE 0.5 Alte Detalii: Daca schimbat-i entitatea armei, de exemplu: din "weapon_mac10" in "weapon_deagle" ar putea sa se buguiasca. Link Download: https://www.mediafire.com/file/cu7t1gub442jrcu/cso_dual_uzi.rar/file SMA #include <amxmodx> #include <fakemeta_util> #include <hamsandwich> #define get_bit(%1,%2) ((%1 & (1 << (%2 & 31))) ? 1 : 0) #define set_bit(%1,%2) %1 |= (1 << (%2 & 31)) #define reset_bit(%1,%2) %1 &= ~(1 << (%2 & 31)) //Resources new const VIEW_MODEL[] = "models/v_dualuzi.mdl"; new const PLAYER_MODEL[] = "models/p_dualuzi.mdl"; new const SHOOT_SOUND[] = "weapons/dualuzi-1.wav"; //Settings new const WEAPON_REFERENCE[] = "weapon_mac10"; #define WEAPON_CSW CSW_MAC10 #define WEAPON_MAX_CLIP 30 #define RECOIL 0.7 #define WEAPON_RATE 0.1 #define WEAPON_DAMAGE 0.5 //Parameters new g_uzi, HamHook: gl_HamHook_TraceAttack[4]; //Animations #define ANIM_DRAW_TIME 36/25.0 #define WEAPON_ANIM_SHOOT_TIME 25/25.0 #define ANIM_RELOAD_TIME 70/18.0 enum { ANIM_IDLE, AA, AA1, ANIM_SHOOT1, AN2, AN3, AN4, AN5, AN6, ANIM_SHOOT2, AD2, AD3, AD4, AD5, AD6, ANIM_RELOAD, ANIM_DRAW //Some Animations Are Useless } public plugin_init() { register_plugin("CSO: Dual Uzi", "1.0", "Cristian505"); register_clcmd("say /du", "give_weapon"); //Fakemeta register_forward(FM_UpdateClientData, "Block_Data_DUzi", 1); //Hamsandwich RegisterHam(Ham_Item_Deploy, WEAPON_REFERENCE, "Set_DUzi_Model", 1); RegisterHam(Ham_Weapon_PrimaryAttack, WEAPON_REFERENCE, "Primary_Attack_DUzi", false); RegisterHam(Ham_Weapon_Reload, WEAPON_REFERENCE, "fw_Weapon_Reload_DUzi", 1); //Trace Attack gl_HamHook_TraceAttack[0] = RegisterHam(Ham_TraceAttack, "func_breakable", "Set_Damage_DUzi", false); gl_HamHook_TraceAttack[1] = RegisterHam(Ham_TraceAttack, "info_target", "Set_Damage_DUzi", false); gl_HamHook_TraceAttack[2] = RegisterHam(Ham_TraceAttack, "player", "Set_Damage_DUzi", false); gl_HamHook_TraceAttack[3] = RegisterHam(Ham_TraceAttack, "hostage_entity", "Set_Damage_DUzi", false); } public plugin_precache() { engfunc(EngFunc_PrecacheModel, VIEW_MODEL); engfunc(EngFunc_PrecacheModel, PLAYER_MODEL); engfunc(EngFunc_PrecacheSound, SHOOT_SOUND); } public give_weapon(id) { set_bit(g_uzi, id); fm_give_item(id, WEAPON_REFERENCE); emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM); } public client_disconnected(id) { reset_bit(g_uzi, id); } public Set_DUzi_Model(index) { static id; id = get_pdata_cbase(index, 41, 4); if(!get_bit(g_uzi, id)) return; set_pev(id, pev_viewmodel2, VIEW_MODEL); set_pev(id, pev_weaponmodel2, PLAYER_MODEL); set_pdata_string(id, (492) * 4, "dualpistols", -1 , 20) UTIL_SendWeaponAnim(id, ANIM_DRAW); set_pdata_float(id, 83, ANIM_DRAW_TIME, 5); set_pdata_float(index, 48, ANIM_DRAW_TIME, 4); } public Primary_Attack_DUzi(index) { static id; id = get_pdata_cbase(index, 41, 4); if(!get_bit(g_uzi, id)) return HAM_IGNORED; static iClip; iClip = get_pdata_int(index, 51, 4); if(!iClip) { ExecuteHam(Ham_Weapon_PlayEmptySound, index); set_pdata_float(index, 46, 0.2, 4); return HAM_SUPERCEDE; } static fw_TraceLine; fw_TraceLine = register_forward(FM_TraceLine, "FM_Hook_TraceLine_Post_DUzi", 1); static fw_PlayBackEvent; fw_PlayBackEvent = register_forward(FM_PlaybackEvent, "FM_Hook_PlaybackEvent_Pre", 0); ExecuteHam(Ham_Weapon_PrimaryAttack, index); unregister_forward(FM_TraceLine, fw_TraceLine, true); unregister_forward(FM_PlaybackEvent, fw_PlayBackEvent); set_pdata_float(id, 111, get_gametime() - 1.0); static Float: vecPunchangle[3]; pev(id, pev_punchangle, vecPunchangle); vecPunchangle[0] *= RECOIL vecPunchangle[1] *= RECOIL vecPunchangle[2] *= RECOIL set_pev(id, pev_punchangle, vecPunchangle); switch(random_num(1, 2)) { case 1: { UTIL_SendWeaponAnim(id, ANIM_SHOOT1); } case 2: { UTIL_SendWeaponAnim(id, ANIM_SHOOT2); } } emit_sound(id, CHAN_WEAPON, SHOOT_SOUND, VOL_NORM, ATTN_NORM, 0, PITCH_NORM); set_pdata_float(index, 46, WEAPON_RATE, 4); set_pdata_float(index, 47, WEAPON_ANIM_SHOOT_TIME, 4); set_pdata_float(index, 48, WEAPON_ANIM_SHOOT_TIME, 4); return HAM_SUPERCEDE; } public Set_Damage_DUzi(iVictim, iAttacker, Float: flDamage) { if(!is_user_connected(iAttacker)) return; if(!get_bit(g_uzi, iAttacker)) return; if(get_user_weapon(iAttacker) == WEAPON_CSW) { flDamage *= WEAPON_DAMAGE SetHamParamFloat(3, flDamage); } } public fw_Weapon_Reload_DUzi(index) { static id; id = get_pdata_cbase(index, 41, 4); if(!get_bit(g_uzi, id)) return HAM_IGNORED; static iClip; iClip = get_pdata_int(index, 51, 4); if(iClip >= WEAPON_MAX_CLIP) return HAM_SUPERCEDE; static iAmmoType; iAmmoType = 376 + get_pdata_int(index, 49, 4); if(get_pdata_int(id, iAmmoType, 5) <= 0) return HAM_SUPERCEDE ExecuteHam(Ham_Weapon_Reload, index); UTIL_SendWeaponAnim(id, ANIM_RELOAD); set_pdata_float(index, 47, ANIM_RELOAD_TIME, 4); set_pdata_float(index, 48, ANIM_RELOAD_TIME, 4); set_pdata_float(id, 83, ANIM_RELOAD_TIME, 5); set_pdata_int(index, 54, 1, 4); return HAM_SUPERCEDE; } public FM_Hook_TraceLine_Post_DUzi(const Float: vecOrigin1[3], const Float: vecOrigin2[3], iFlags, iAttacker, iTrace) { if(iFlags & IGNORE_MONSTERS) return FMRES_IGNORED; if(!is_user_alive(iAttacker)) return FMRES_IGNORED; static pHit; pHit = get_tr2(iTrace, TR_pHit); static Float: vecEndPos[3]; get_tr2(iTrace, TR_vecEndPos, vecEndPos); if(pHit > 0) if(pev(pHit, pev_solid) != SOLID_BSP) return FMRES_IGNORED; engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, vecEndPos, 0); write_byte(TE_WORLDDECAL); engfunc(EngFunc_WriteCoord, vecEndPos[0]); engfunc(EngFunc_WriteCoord, vecEndPos[1]); engfunc(EngFunc_WriteCoord, vecEndPos[2]); write_byte(random_num(41, 45)); message_end(); message_begin(MSG_BROADCAST, SVC_TEMPENTITY); write_byte(TE_STREAK_SPLASH); engfunc(EngFunc_WriteCoord, vecEndPos[0]); engfunc(EngFunc_WriteCoord, vecEndPos[1]); engfunc(EngFunc_WriteCoord, vecEndPos[2]); write_coord(random_num(-20, 20)); write_coord(random_num(-20, 20)); write_coord(random_num(-20, 20)); write_byte(5); write_short(70); write_short(3); write_short(75); message_end(); return FMRES_IGNORED; } public FM_Hook_PlaybackEvent_Pre() return FMRES_SUPERCEDE; public Block_Data_DUzi(id, SendWeapons, CD_Handle) { if(!is_user_alive(id)) return; if(get_user_weapon(id) != WEAPON_CSW) return; if(!get_bit(g_uzi, id)) return; set_cd(CD_Handle, CD_flNextAttack, get_gametime() + 0.001); } stock UTIL_SendWeaponAnim(iPlayer, iAnim) { set_pev(iPlayer, pev_weaponanim, iAnim); message_begin(MSG_ONE, SVC_WEAPONANIM, _, iPlayer); write_byte(iAnim); write_byte(0); message_end(); } Poze:
  4. Salut! :)

    1. Darian433

      Darian433

      Salut! 😛

×
×
  • Create New...