Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

Cała aktywność

Kanał aktualizowany automatycznie

  1. Dzisiaj
  2. Witajcie! 🖐️ Z wielką radością pragniemy ogłosić, że właśnie wystartowała sprzedaż serwerów do CS2! Zapraszamy do zapoznania się z naszą atrakcyjną ofertą (klik), która składa się obecnie z dwóch pakietów: CS2 DEV oraz CS2 STANDARD. Ceny naszych usług rozpoczynają się już od 24.99 zł / 54.99 zł brutto. Dodatkowo, oferujemy wyjątkowo rozbudowany Panel, w którym znajdziesz między innymi: 🛒 Itemshop całkowicie darmowy w ramach usługi. Przykładowy itemshop dostępny tutaj: https://is.zenway.pl/purchase/9c7AaqnY0J 🛠️ Wbudowany instalator pluginów, ułatwiający proces instalacji 📦 Instalator paczek serwerowych 📜 Rozbudowany system logów, który możesz dostosować do własnych potrzeb i wysyłać na swój serwer Discord Aby uczcić ten początek, zachęcamy użytkowników Mygo do skorzystania z naszej promocji -15% z kodem mygo15 Zapraszamy do dołączenia do naszej społeczności! 🎮
  3. This is a plugin based off of the bring/goto plugin from tf2 which doesn't work in the source mods so i decided to make this invoke the cheat commands, getpos through functions and setpos on the target to teleport to them or bring them! This should work on the TF2 sourcemod's for admins to use! CVARS: sm_bring - Brings a specified client to you sm_goto - Teleports you to the specified client Attached Files Teleport.smx (5.2 KB) Get Plugin or Get Source (Teleport.sp - 3.0 KB) Wyświetl pełny artykuł
  4. Thanks for reading. I have a rather small issue with uq_jumpstats, I think if someone fixes this all people will benefit I connected uq_jumpstats to mysql, and I find out that special characters are not working in the database, let me show you what I mean: Quote: It should look like this: name "エ ォ オ カ ガ キ ギ ク グ ケ ゲ " ______________________________ But It looks like this in the web page: Attachment 204275 ______________________________ In the database It is the same issue: Attachment 204276 Who's willing to fix this? ________________________ Link to the plugin: https://forums.alliedmods.net/showthread.php?t=141586 Attached Thumbnails Przeczytaj cały wpis
  5. Hello this is the .sma Code: #include <amxmodx> #include <engine> #include <fakemeta> #include <fakemeta_util> #include <hamsandwich> #include <cstrike> #include <xs> #define PLUGIN "Dragon Sword" #define VERSION "2.0" #define AUTHOR "Dias Leon" #define V_MODEL "models/v_dragonsword2.mdl" #define P_MODEL "models/p_dragonsword.mdl" #define CSW_DRAGONSWORD CSW_KNIFE #define weapon_dragonsword "weapon_knife" #define WEAPON_ANIMEXT "knife" //"skullaxe" #define DRAW_TIME 1.0 #define SLASH_ROTATE_DAMAGE 75.0 #define SLASH_ROTATE_RADIUS 110.0 #define SLASH_ROTATE_POINT_DIS 60.0 #define SLASH_ROTATE_DELAY_TIME 0.7 #define SLASH_ROTATE_RESET_TIME 1.0 #define SLASH_AHEAD_DAMAGE 90.0 #define SLASH_AHEAD_RADIUS 90.0 #define SLASH_AHEAD_POINT_DIS 30.0 #define SLASH_AHEAD_DELAY_TIME 0.3 #define SLASH_AHEAD_RESET_TIME 0.9 #define STAB_DAMAGE 110.0 #define STAB_RADIUS 100.0 #define STAB_POINT_DIS 80.0 #define STAB_TIME 0.657 #define STAB_RESET_TIME 0.75 #define TASK_SLASHING 2033+20 #define TASK_STABING 2033+10 // OFFSET const PDATA_SAFE = 2 const OFFSET_LINUX_WEAPONS = 4 const OFFSET_WEAPONOWNER = 41 const m_flNextAttack = 83 const m_szAnimExtention = 492 new const DragonSword_Sound[8][] = { "weapons/dragonsword_draw.wav", "weapons/dragonsword_hit1.wav", "weapons/dragonsword_hit2.wav", "weapons/dragonsword_idle.wav", "weapons/dragonsword_slash1.wav", "weapons/dragonsword_slash2.wav", "weapons/dragonsword_stab_hit.wav", "weapons/dragonsword_wall.wav" } enum { ATTACK_SLASH_ROTATE = 1, ATTACK_SLASH_AHEAD, ATTACK_STAB } enum { DS_ANIM_IDLE = 0, DS_ANIM_SLASH_ROTATE, DS_ANIM_SLASH_AHEAD, DS_ANIM_DRAW, DS_ANIM_STAB_BEGIN, DS_ANIM_STAB_END } enum { HIT_NOTHING = 0, HIT_ENEMY, HIT_WALL } new g_Had_DragonSword[33], g_Slashing_Mode[33], g_Attack_Mode[33], g_Checking_Mode[33], g_Hit_Ing[33] new g_Old_Weapon[33], g_Ham_Bot, g_MaxPlayers public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0") register_event("CurWeapon", "Event_CurWeapon", "be", "1=1") register_forward(FM_EmitSound, "fw_EmitSound") register_forward(FM_CmdStart, "fw_CmdStart") register_forward(FM_TraceLine, "fw_TraceLine") register_forward(FM_TraceHull, "fw_TraceHull") RegisterHam(Ham_TraceAttack, "player", "fw_PlayerTraceAttack") g_MaxPlayers = get_maxplayers() register_clcmd("admin_get_dragonsword", "get_dragonsword", ADMIN_KICK) } public plugin_precache() { engfunc(EngFunc_PrecacheModel, V_MODEL) engfunc(EngFunc_PrecacheModel, P_MODEL) for(new i = 0; i < sizeof(DragonSword_Sound); i++) engfunc(EngFunc_PrecacheSound, DragonSword_Sound[i]) } public get_dragonsword(id) { if(!is_user_alive(id)) return remove_task(id+TASK_SLASHING) remove_task(id+TASK_STABING) g_Had_DragonSword[id] = 1 g_Slashing_Mode[id] = 0 g_Attack_Mode[id] = 0 g_Checking_Mode[id] = 0 g_Hit_Ing[id] = 0 if(get_user_weapon(id) == CSW_KNIFE) { set_pev(id, pev_viewmodel2, V_MODEL) set_pev(id, pev_weaponmodel2, P_MODEL) set_weapon_anim(id, DS_ANIM_DRAW) set_player_nextattack(id, DRAW_TIME) } else { engclient_cmd(id, weapon_dragonsword) } } public remove_dragonsword(id) { remove_task(id+TASK_SLASHING) remove_task(id+TASK_STABING) g_Had_DragonSword[id] = 0 g_Slashing_Mode[id] = 0 g_Attack_Mode[id] = 0 g_Checking_Mode[id] = 0 g_Hit_Ing[id] = 0 } public client_putinserver(id) { if(!g_Ham_Bot && is_user_bot(id)) { g_Ham_Bot = 1 set_task(0.1, "Do_RegisterHam_Bot", id) } } public Do_RegisterHam_Bot(id) { RegisterHamFromEntity(Ham_TraceAttack, id, "fw_PlayerTraceAttack") } public Event_NewRound() { for(new i = 0; i < g_MaxPlayers; i++) remove_dragonsword(i) } public Event_CurWeapon(id) { if(!is_user_alive(id)) return // Problem Here ?. SHUT THE FUCK UP if((read_data(2) == CSW_DRAGONSWORD && g_Old_Weapon[id] != CSW_DRAGONSWORD) && g_Had_DragonSword[id]) { set_pev(id, pev_viewmodel2, V_MODEL) set_pev(id, pev_weaponmodel2, P_MODEL) set_weapon_anim(id, DS_ANIM_DRAW) set_player_nextattack(id, DRAW_TIME) set_pdata_string(id, m_szAnimExtention * 4, WEAPON_ANIMEXT, -1 , 20) } g_Old_Weapon[id] = read_data(2) } public fw_EmitSound(id, channel, const sample[], Float:volume, Float:attn, flags, pitch) { if(!is_user_connected(id)) return FMRES_IGNORED if(/*get_user_weapon(id) != CSW_DRAGONSWORD || */!g_Had_DragonSword[id]) return FMRES_IGNORED if(sample[8] == 'k' && sample[9] == 'n' && sample[10] == 'i') { if(sample[14] == 's' && sample[15] == 'l' && sample[16] == 'a') return FMRES_SUPERCEDE if (sample[14] == 'h' && sample[15] == 'i' && sample[16] == 't') { if (sample[17] == 'w') // wall { g_Hit_Ing[id] = HIT_WALL return FMRES_SUPERCEDE } else { g_Hit_Ing[id] = HIT_ENEMY return FMRES_SUPERCEDE } } if (sample[14] == 's' && sample[15] == 't' && sample[16] == 'a') return FMRES_SUPERCEDE; } return FMRES_IGNORED } public fw_CmdStart(id, uc_handle, seed) { if (!is_user_alive(id)) return if(get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id]) return static ent; ent = fm_get_user_weapon_entity(id, CSW_DRAGONSWORD) if(!pev_valid(ent)) return if(get_pdata_float(ent, 46, OFFSET_LINUX_WEAPONS) > 0.0 || get_pdata_float(ent, 47, OFFSET_LINUX_WEAPONS) > 0.0) return static CurButton CurButton = get_uc(uc_handle, UC_Buttons) if (CurButton & IN_ATTACK) { set_uc(uc_handle, UC_Buttons, CurButton & ~IN_ATTACK) if(!g_Slashing_Mode[id]) { g_Attack_Mode[id] = ATTACK_SLASH_ROTATE g_Checking_Mode[id] = 1 ExecuteHamB(Ham_Weapon_PrimaryAttack, ent) g_Checking_Mode[id] = 0 set_pev(id, pev_framerate, 1.5) set_weapons_timeidle(id, CSW_DRAGONSWORD, SLASH_ROTATE_RESET_TIME) set_player_nextattack(id, SLASH_ROTATE_RESET_TIME) set_weapon_anim(id, DS_ANIM_SLASH_ROTATE) set_task(SLASH_ROTATE_DELAY_TIME, "Do_Slashing_Rotate", id+TASK_SLASHING) } else { g_Attack_Mode[id] = ATTACK_SLASH_AHEAD g_Checking_Mode[id] = 1 ExecuteHamB(Ham_Weapon_PrimaryAttack, ent) g_Checking_Mode[id] = 0 set_pev(id, pev_framerate, 2.0) set_weapons_timeidle(id, CSW_DRAGONSWORD, SLASH_AHEAD_RESET_TIME) set_player_nextattack(id, SLASH_AHEAD_RESET_TIME) set_weapon_anim(id, DS_ANIM_SLASH_AHEAD) set_task(SLASH_AHEAD_DELAY_TIME, "Do_Slashing_Ahead", id+TASK_SLASHING) } g_Slashing_Mode[id] = !g_Slashing_Mode[id] } else if (CurButton & IN_ATTACK2) { set_uc(uc_handle, UC_Buttons, CurButton & ~IN_ATTACK2) g_Attack_Mode[id] = ATTACK_STAB g_Checking_Mode[id] = 1 ExecuteHamB(Ham_Weapon_SecondaryAttack, ent) g_Checking_Mode[id] = 0 set_pev(id, pev_framerate, 1.5) set_weapons_timeidle(id, CSW_DRAGONSWORD, STAB_TIME + 0.1) set_player_nextattack(id, STAB_TIME + 0.1) set_weapon_anim(id, DS_ANIM_STAB_BEGIN) remove_task(id+TASK_STABING) set_task(STAB_TIME, "Do_StabNow", id+TASK_STABING) } } public Do_Slashing_Rotate(id) { id -= TASK_SLASHING if(!is_user_alive(id)) return if(get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id]) return if(Check_Attack(id, ATTACK_SLASH_ROTATE)) { emit_sound(id, CHAN_WEAPON, DragonSword_Sound[1], 1.0, ATTN_NORM, 0, PITCH_NORM) } else { if(g_Hit_Ing[id] == HIT_WALL) emit_sound(id, CHAN_WEAPON, DragonSword_Sound[7], 1.0, ATTN_NORM, 0, PITCH_NORM) else if(g_Hit_Ing[id] == HIT_NOTHING) emit_sound(id, CHAN_WEAPON, DragonSword_Sound[4], 1.0, ATTN_NORM, 0, PITCH_NORM) } g_Attack_Mode[id] = 0 g_Hit_Ing[id] = 0 } public Do_Slashing_Ahead(id) { id -= TASK_SLASHING if(!is_user_alive(id)) return if(get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id]) return if(Check_Attack(id, ATTACK_SLASH_AHEAD)) { emit_sound(id, CHAN_WEAPON, DragonSword_Sound[2], 1.0, ATTN_NORM, 0, PITCH_NORM) } else { if(g_Hit_Ing[id] == HIT_WALL) emit_sound(id, CHAN_WEAPON, DragonSword_Sound[7], 1.0, ATTN_NORM, 0, PITCH_NORM) else if(g_Hit_Ing[id] == HIT_NOTHING) emit_sound(id, CHAN_WEAPON, DragonSword_Sound[5], 1.0, ATTN_NORM, 0, PITCH_NORM) } g_Attack_Mode[id] = 0 g_Hit_Ing[id] = 0 } public Do_StabNow(id) { id -= TASK_STABING if (!is_user_alive(id)) return if(!g_Had_DragonSword[id]) return set_weapon_anim(id, DS_ANIM_STAB_END) if(get_user_weapon(id) != CSW_DRAGONSWORD) { set_weapons_timeidle(id, CSW_DRAGONSWORD, 0.0) set_player_nextattack(id, 0.0) } else { set_weapons_timeidle(id, CSW_DRAGONSWORD, STAB_RESET_TIME) set_player_nextattack(id, STAB_RESET_TIME) } if(Check_Attack(id, ATTACK_STAB)) { emit_sound(id, CHAN_WEAPON, DragonSword_Sound[1], 1.0, ATTN_NORM, 0, PITCH_NORM) } else { if(g_Hit_Ing[id] == HIT_WALL) emit_sound(id, CHAN_WEAPON, DragonSword_Sound[7], 1.0, ATTN_NORM, 0, PITCH_NORM) else if(g_Hit_Ing[id] == HIT_NOTHING) emit_sound(id, CHAN_WEAPON, DragonSword_Sound[6], 1.0, ATTN_NORM, 0, PITCH_NORM) } g_Attack_Mode[id] = 0 g_Hit_Ing[id] = 0 } public Check_Attack(id, Mode) { static Float:Max_Distance, Float:Point[4][3], Float:TB_Distance, Float:Point_Dis if(Mode == ATTACK_SLASH_ROTATE) { Point_Dis = SLASH_ROTATE_POINT_DIS Max_Distance = SLASH_ROTATE_RADIUS TB_Distance = Max_Distance / 4.0 } else if(Mode == ATTACK_SLASH_AHEAD) { Point_Dis = SLASH_AHEAD_POINT_DIS Max_Distance = SLASH_AHEAD_RADIUS TB_Distance = Max_Distance / 4.0 } else if(Mode == ATTACK_STAB) { Point_Dis = STAB_POINT_DIS Max_Distance = STAB_RADIUS TB_Distance = Max_Distance / 4.0 } static Float:VicOrigin[3], Float:MyOrigin[3] pev(id, pev_origin, MyOrigin) for(new i = 0; i < 4; i++) get_position(id, TB_Distance * (i + 1), 0.0, 0.0, Point[i]) static Have_Victim; Have_Victim = 0 static ent ent = fm_get_user_weapon_entity(id, get_user_weapon(id)) if(!pev_valid(ent)) return 0 for(new i = 0; i < get_maxplayers(); i++) { if(!is_user_alive(i)) continue if(id == i) continue if(entity_range(id, i) > Max_Distance) continue pev(i, pev_origin, VicOrigin) if(is_wall_between_points(MyOrigin, VicOrigin, id)) continue if(get_distance_f(VicOrigin, Point[0]) <= Point_Dis || get_distance_f(VicOrigin, Point[1]) <= Point_Dis || get_distance_f(VicOrigin, Point[2]) <= Point_Dis || get_distance_f(VicOrigin, Point[3]) <= Point_Dis) { if(!Have_Victim) Have_Victim = 1 if(Mode == ATTACK_SLASH_ROTATE) do_attack(id, i, ent, SLASH_ROTATE_DAMAGE) else if(Mode == ATTACK_SLASH_AHEAD) do_attack(id, i, ent, SLASH_AHEAD_DAMAGE) else if(Mode == ATTACK_STAB) do_attack(id, i, ent, STAB_DAMAGE) } } if(Have_Victim) return 1 else return 0 return 0 } public fw_TraceLine(Float:vector_start[3], Float:vector_end[3], ignored_monster, id, handle) { if (!is_user_alive(id)) return FMRES_IGNORED if (get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id]) return FMRES_IGNORED static Float:vecStart[3], Float:vecEnd[3], Float:v_angle[3], Float:v_forward[3], Float:view_ofs[3], Float:fOrigin[3] pev(id, pev_origin, fOrigin) pev(id, pev_view_ofs, view_ofs) xs_vec_add(fOrigin, view_ofs, vecStart) pev(id, pev_v_angle, v_angle) engfunc(EngFunc_MakeVectors, v_angle) get_global_vector(GL_v_forward, v_forward) if(g_Attack_Mode[id] == ATTACK_SLASH_ROTATE) xs_vec_mul_scalar(v_forward, SLASH_ROTATE_RADIUS, v_forward) else if(g_Attack_Mode[id] == ATTACK_SLASH_AHEAD) xs_vec_mul_scalar(v_forward, SLASH_AHEAD_RADIUS, v_forward) else if(g_Attack_Mode[id] == ATTACK_STAB) xs_vec_mul_scalar(v_forward, STAB_RADIUS, v_forward) else xs_vec_mul_scalar(v_forward, 0.0, v_forward) xs_vec_add(vecStart, v_forward, vecEnd) engfunc(EngFunc_TraceLine, vecStart, vecEnd, ignored_monster, id, handle) return FMRES_SUPERCEDE } public fw_TraceHull(Float:vector_start[3], Float:vector_end[3], ignored_monster, hull, id, handle) { if (!is_user_alive(id)) return FMRES_IGNORED if (get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id]) return FMRES_IGNORED static Float:vecStart[3], Float:vecEnd[3], Float:v_angle[3], Float:v_forward[3], Float:view_ofs[3], Float:fOrigin[3] pev(id, pev_origin, fOrigin) pev(id, pev_view_ofs, view_ofs) xs_vec_add(fOrigin, view_ofs, vecStart) pev(id, pev_v_angle, v_angle) engfunc(EngFunc_MakeVectors, v_angle) get_global_vector(GL_v_forward, v_forward) if(g_Attack_Mode[id] == ATTACK_SLASH_ROTATE) xs_vec_mul_scalar(v_forward, SLASH_ROTATE_RADIUS, v_forward) else if(g_Attack_Mode[id] == ATTACK_SLASH_AHEAD) xs_vec_mul_scalar(v_forward, SLASH_AHEAD_RADIUS, v_forward) else if(g_Attack_Mode[id] == ATTACK_STAB) xs_vec_mul_scalar(v_forward, STAB_RADIUS, v_forward) else xs_vec_mul_scalar(v_forward, 0.0, v_forward) xs_vec_add(vecStart, v_forward, vecEnd) engfunc(EngFunc_TraceHull, vecStart, vecEnd, ignored_monster, hull, id, handle) return FMRES_SUPERCEDE } public fw_PlayerTraceAttack(Victim, Attacker, Float:Damage, Float:Direction[3], TraceResult, DamageBits) { if(!is_user_alive(Attacker)) return HAM_IGNORED if(!g_Had_DragonSword[Attacker] || !g_Checking_Mode[Attacker]) return HAM_IGNORED return HAM_SUPERCEDE } do_attack(Attacker, Victim, Inflictor, Float:fDamage) { fake_player_trace_attack(Attacker, Victim, fDamage) fake_take_damage(Attacker, Victim, fDamage, Inflictor) } fake_player_trace_attack(iAttacker, iVictim, &Float:fDamage) { // get fDirection new Float:fAngles[3], Float:fDirection[3] pev(iAttacker, pev_angles, fAngles) angle_vector(fAngles, ANGLEVECTOR_FORWARD, fDirection) // get fStart new Float:fStart[3], Float:fViewOfs[3] pev(iAttacker, pev_origin, fStart) pev(iAttacker, pev_view_ofs, fViewOfs) xs_vec_add(fViewOfs, fStart, fStart) // get aimOrigin new iAimOrigin[3], Float:fAimOrigin[3] get_user_origin(iAttacker, iAimOrigin, 3) IVecFVec(iAimOrigin, fAimOrigin) // TraceLine from fStart to AimOrigin new ptr = create_tr2() engfunc(EngFunc_TraceLine, fStart, fAimOrigin, DONT_IGNORE_MONSTERS, iAttacker, ptr) new pHit = get_tr2(ptr, TR_pHit) new iHitgroup = get_tr2(ptr, TR_iHitgroup) new Float:fEndPos[3] get_tr2(ptr, TR_vecEndPos, fEndPos) // get target & body at aiming new iTarget, iBody get_user_aiming(iAttacker, iTarget, iBody) // if aiming find target is iVictim then update iHitgroup if (iTarget == iVictim) { iHitgroup = iBody } // if ptr find target not is iVictim else if (pHit != iVictim) { // get AimOrigin in iVictim new Float:fVicOrigin[3], Float:fVicViewOfs[3], Float:fAimInVictim[3] pev(iVictim, pev_origin, fVicOrigin) pev(iVictim, pev_view_ofs, fVicViewOfs) xs_vec_add(fVicViewOfs, fVicOrigin, fAimInVictim) fAimInVictim[2] = fStart[2] fAimInVictim[2] += get_distance_f(fStart, fAimInVictim) * floattan( fAngles[0] * 2.0, degrees ) // check aim in size of iVictim new iAngleToVictim = get_angle_to_target(iAttacker, fVicOrigin) iAngleToVictim = abs(iAngleToVictim) new Float:fDis = 2.0 * get_distance_f(fStart, fAimInVictim) * floatsin( float(iAngleToVictim) * 0.5, degrees ) new Float:fVicSize[3] pev(iVictim, pev_size , fVicSize) if ( fDis <= fVicSize[0] * 0.5 ) { // TraceLine from fStart to aimOrigin in iVictim new ptr2 = create_tr2() engfunc(EngFunc_TraceLine, fStart, fAimInVictim, DONT_IGNORE_MONSTERS, iAttacker, ptr2) new pHit2 = get_tr2(ptr2, TR_pHit) new iHitgroup2 = get_tr2(ptr2, TR_iHitgroup) // if ptr2 find target is iVictim if ( pHit2 == iVictim && (iHitgroup2 != HIT_HEAD || fDis <= fVicSize[0] * 0.25) ) { pHit = iVictim iHitgroup = iHitgroup2 get_tr2(ptr2, TR_vecEndPos, fEndPos) } free_tr2(ptr2) } // if pHit still not is iVictim then set default HitGroup if (pHit != iVictim) { // set default iHitgroup iHitgroup = HIT_GENERIC new ptr3 = create_tr2() engfunc(EngFunc_TraceLine, fStart, fVicOrigin, DONT_IGNORE_MONSTERS, iAttacker, ptr3) get_tr2(ptr3, TR_vecEndPos, fEndPos) // free ptr3 free_tr2(ptr3) } } // set new Hit & Hitgroup & EndPos set_tr2(ptr, TR_pHit, iVictim) set_tr2(ptr, TR_iHitgroup, iHitgroup) set_tr2(ptr, TR_vecEndPos, fEndPos) // hitgroup multi fDamage new Float:fMultifDamage switch(iHitgroup) { case HIT_HEAD: fMultifDamage = 4.0 case HIT_STOMACH: fMultifDamage = 1.25 case HIT_LEFTLEG: fMultifDamage = 0.75 case HIT_RIGHTLEG: fMultifDamage = 0.75 default: fMultifDamage = 1.0 } fDamage *= fMultifDamage // ExecuteHam fake_trake_attack(iAttacker, iVictim, fDamage, fDirection, ptr) // free ptr free_tr2(ptr) } stock fake_trake_attack(iAttacker, iVictim, Float:fDamage, Float:fDirection[3], iTraceHandle, iDamageBit = (DMG_NEVERGIB | DMG_BULLET)) { ExecuteHamB(Ham_TraceAttack, iVictim, iAttacker, fDamage, fDirection, iTraceHandle, iDamageBit) } stock fake_take_damage(iAttacker, iVictim, Float:fDamage, iInflictor = 0, iDamageBit = (DMG_NEVERGIB | DMG_BULLET)) { iInflictor = (!iInflictor) ? iAttacker : iInflictor ExecuteHamB(Ham_TakeDamage, iVictim, iInflictor, iAttacker, fDamage, iDamageBit) } stock get_angle_to_target(id, const Float:fTarget[3], Float:TargetSize = 0.0) { new Float:fOrigin[3], iAimOrigin[3], Float:fAimOrigin[3], Float:fV1[3] pev(id, pev_origin, fOrigin) get_user_origin(id, iAimOrigin, 3) // end position from eyes IVecFVec(iAimOrigin, fAimOrigin) xs_vec_sub(fAimOrigin, fOrigin, fV1) new Float:fV2[3] xs_vec_sub(fTarget, fOrigin, fV2) new iResult = get_angle_between_vectors(fV1, fV2) if (TargetSize > 0.0) { new Float:fTan = TargetSize / get_distance_f(fOrigin, fTarget) new fAngleToTargetSize = floatround( floatatan(fTan, degrees) ) iResult -= (iResult > 0) ? fAngleToTargetSize : -fAngleToTargetSize } return iResult } stock get_angle_between_vectors(const Float:fV1[3], const Float:fV2[3]) { new Float:fA1[3], Float:fA2[3] engfunc(EngFunc_VecToAngles, fV1, fA1) engfunc(EngFunc_VecToAngles, fV2, fA2) new iResult = floatround(fA1[1] - fA2[1]) iResult = iResult % 360 iResult = (iResult > 180) ? (iResult - 360) : iResult return iResult } stock fm_cs_get_weapon_ent_owner(ent) { if (pev_valid(ent) != PDATA_SAFE) return -1 return get_pdata_cbase(ent, OFFSET_WEAPONOWNER, OFFSET_LINUX_WEAPONS) } stock set_weapon_anim(id, anim) { if(!is_user_alive(id)) return set_pev(id, pev_weaponanim, anim) message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, _, id) write_byte(anim) write_byte(0) message_end() } stock set_weapons_timeidle(id, WeaponId ,Float:TimeIdle) { if(!is_user_alive(id)) return static entwpn; entwpn = fm_get_user_weapon_entity(id, WeaponId) if(!pev_valid(entwpn)) return set_pdata_float(entwpn, 46, TimeIdle, OFFSET_LINUX_WEAPONS) set_pdata_float(entwpn, 47, TimeIdle, OFFSET_LINUX_WEAPONS) set_pdata_float(entwpn, 48, TimeIdle + 0.5, OFFSET_LINUX_WEAPONS) } stock set_player_nextattack(id, Float:nexttime) { if(!is_user_alive(id)) return set_pdata_float(id, m_flNextAttack, nexttime, 5) } stock is_valid_entity(ent) { if(pev_valid(ent) != PDATA_SAFE) return 0 return 1 } stock get_position(ent, Float:forw, Float:right, Float:up, Float:vStart[]) { static Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3] pev(ent, pev_origin, vOrigin) pev(ent, pev_view_ofs,vUp) //for player xs_vec_add(vOrigin,vUp,vOrigin) pev(ent, pev_v_angle, vAngle) // if normal entity ,use pev_angles angle_vector(vAngle,ANGLEVECTOR_FORWARD,vForward) //or use EngFunc_AngleVectors angle_vector(vAngle,ANGLEVECTOR_RIGHT,vRight) angle_vector(vAngle,ANGLEVECTOR_UP,vUp) vStart[0] = vOrigin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up vStart[1] = vOrigin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up vStart[2] = vOrigin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up } stock is_wall_between_points(Float:start[3], Float:end[3], ignore_ent) { static ptr ptr = create_tr2() engfunc(EngFunc_TraceLine, start, end, IGNORE_MONSTERS, ignore_ent, ptr) static Float:EndPos[3] get_tr2(ptr, TR_vecEndPos, EndPos) free_tr2(ptr) return floatround(get_distance_f(end, EndPos)) }The .inl model example Code: /////////////////////////////////////////////////////////////////////////////////////////////////// //-----------------------------------------| DualKatana |------------------------------------------ //========================================== sDs|Aragon* ========================================== ///////////// // Settings | //==========/ #define DUALKATANA_OLD_NAME "knife" #define DUALKATANA_NEW_NAME "dualkatana" #define DUALKATANA_OLD_EVENT "events/knife.sc" #define weapon_dualkatana "weapon_knife" #define CSW_DUALKATANA CSW_KNIFE #define DUALKATANA_NAME "Dual Katana" #define DUALKATANA_TEAM WPN_TEAM_T #define DUALKATANA_ACCES WPN_ACCES_ALL #define DUALKATANA_LEVEL 0 #define DUALKATANA_DAMAGE 3.0 #define DUALKATANA_SLASH_DELAY 0.5 #define DUALKATANA_STAB_DELAY 1.0 new DualKatanaModel_V[] = "models/Furien40+/v_dualkatana.mdl", DualKatanaModel_P[] = "models/Furien40/p_dualkatana.mdl", DualKatana_WeaponList[] = "furien40_dualkatana", DualKatana_Sprites[] = "sprites/Furien40/dualkatana.spr", DualKatana_Sound[][][] = { { "weapons/dualkatana_draw.wav", "weapons/knife_deploy1.wav" }, { "weapons/dualkatana_hit1.wav", "weapons/knife_hit1.wav" }, { "weapons/dualkatana_hit2.wav", "weapons/knife_hit2.wav" }, { "weapons/dualkatana_hit1.wav", "weapons/knife_hit3.wav" }, { "weapons/dualkatana_hit2.wav", "weapons/knife_hit4.wav" }, { "weapons/dualkatana_hitwall.wav", "weapons/knife_hitwall1.wav" }, { "weapons/dualkatana_slash1.wav", "weapons/knife_slash1.wav" }, { "weapons/dualkatana_slash2.wav", "weapons/knife_slash2.wav" }, { "weapons/dualkatana_stab.wav", "weapons/knife_stab.wav" } }; /////////////// // Model Info | //============/ enum { DUALKATANA_ANIM_IDLE = 0, DUALKATANA_ANIM_SLASH1, DUALKATANA_ANIM_SLASH2, DUALKATANA_ANIM_DRAW, DUALKATANA_ANIM_STAB, DUALKATANA_ANIM_STAB_MISS }; new Float:DualKatana_AnimationTime[] = { 7.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; //////////// // Globals | //=========/ #define dualkatana_get_anim(%1) entity_get_int(%1, EV_INT_iuser1) #define dualkatana_set_anim(%1,%2) entity_set_int(%1, EV_INT_iuser1, %2) new DualKatanaID, dualkatana_event; /////////////////////////////////////////////////////////////////////////////////////////////////// // Plugin | //================================================================================================= DualKatana_Init() { if (!DualKatanaID) return; register_clcmd(DualKatana_WeaponList, "CMD_DualKatana"); register_message(MSGID_DeathMsg, "DualKatana_DeathMsg"); register_event("CurWeapon", "DualKatana_ViewModel", "be", "1=1", "2=29"); register_forward(FM_PlaybackEvent, "DualKatana_PlaybackEvent"); register_forward(FM_EmitSound, "DualKatana_EmitSound"); register_forward(FM_CmdStart, "DualKatana_CmdStart"); RegisterHam(Ham_Item_Deploy, weapon_dualkatana, "DualKatana_Deploy_Post", 1); RegisterHam(Ham_Weapon_WeaponIdle, weapon_dualkatana, "DualKatana_WeaponIdle"); RegisterHookChain(RG_CBasePlayer_TakeDamage, "DualKatana_TakeDamage"); } DualKatana_Precache() { DualKatanaID = RegisterWeapon(CSW_DUALKATANA, DUALKATANA_NAME, DUALKATANA_TEAM, DUALKATANA_ACCES, DUALKATANA_LEVEL); if (!DualKatanaID) return; register_forward(FM_PrecacheEvent, "DualKatana_PrecacheEvent_Post", 1); precache_model(DualKatanaModel_V); precache_model(DualKatanaModel_P); new WPNList[128]; formatex(WPNList, charsmax(WPNList), "sprites/%s.txt", DualKatana_WeaponList); precache_generic(WPNList); precache_generic(DualKatana_Sprites); for (new i = 0; i < sizeof(DualKatana_Sound); i++) precache_sound(DualKatana_Sound[i][0]); } DualKatana_Natives() { register_native("get_user_dualkatana", "native_get_user_dualkatana"); register_native("set_user_dualkatana", "native_set_user_dualkatana"); register_native("dualkatana_id", "native_dualkatana_id"); } /////////////////////////////////////////////////////////////////////////////////////////////////// // Funcitons | //================================================================================================= public DualKatana_DeathMsg(msg_id, msg_dest, id) { new Attacker = get_msg_arg_int(1); if (is_user_connected(Attacker)) { new TruncatedWeapon[33]; get_msg_arg_string(4, TruncatedWeapon, charsmax(TruncatedWeapon)); if (equal(TruncatedWeapon, DUALKATANA_OLD_NAME)) { if (get_user_dualkatana(Attacker)) set_msg_arg_string(4, DUALKATANA_NEW_NAME); } } } public DualKatana_ViewModel(id) { if (is_user_alive(id) && get_user_dualkatana(id, true)) set_weapon_model(id, DualKatanaModel_V, DualKatanaModel_P); } public DualKatana_PlaybackEvent(flags, invoker, eventid, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iParam1, iParam2, bParam1, bParam2) { if (is_user_connected(invoker) && eventid == dualkatana_event) { playback_event(flags | FEV_HOSTONLY, invoker, eventid, delay, origin, angles, fparam1, fparam2, iParam1, iParam2, bParam1, bParam2); return FMRES_HANDLED; } return FMRES_IGNORED; } public DualKatana_PrecacheEvent_Post(type, const name[]) { if (equal(DUALKATANA_OLD_EVENT, name)) { dualkatana_event = get_orig_retval(); return FMRES_HANDLED; } return FMRES_IGNORED; } public DualKatana_EmitSound(id, channel, const sound[]) { if (is_user_alive(id) && get_user_dualkatana(id, true)) { for (new i = 0; i < sizeof DualKatana_Sound; i++) { if (equal(sound, DualKatana_Sound[i][1])) { emit_sound(id, channel, DualKatana_Sound[i][0], VOL_NORM, ATTN_NORM, 0, PITCH_NORM); return FMRES_SUPERCEDE; } } } return FMRES_IGNORED; } public DualKatana_CmdStart(id, uc_handle, seed) { if (!is_user_alive(id) || get_user_weapon(id) != CSW_DUALKATANA) return FMRES_IGNORED; new CurButton = get_uc(uc_handle, UC_Buttons); if (CurButton & IN_ATTACK) { new ENT_Weapon = cs_get_user_weapon_entity(id); if (is_valid_ent(ENT_Weapon) && get_weapon_key(ENT_Weapon) == DualKatanaID) { if (get_user_NextAttack(id) <= 0.1) { ExecuteHamB(Ham_Weapon_PrimaryAttack, ENT_Weapon); if (dualkatana_get_anim(ENT_Weapon) >= 2) dualkatana_set_anim(ENT_Weapon, 1); else dualkatana_set_anim(ENT_Weapon, dualkatana_get_anim(ENT_Weapon) + 1); new Anim = dualkatana_get_anim(ENT_Weapon); set_weapon_TimeWeaponIdle(ENT_Weapon, DualKatana_AnimationTime[Anim]); set_user_NextAttack(id, DUALKATANA_SLASH_DELAY); SendWeaponAnim(id, Anim, ENT_Weapon); } CurButton &= ~IN_ATTACK; set_uc(uc_handle, UC_Buttons, CurButton); return FMRES_HANDLED; } } else if (CurButton & IN_ATTACK2) { new ENT_Weapon = cs_get_user_weapon_entity(id); if (is_valid_ent(ENT_Weapon) && get_weapon_key(ENT_Weapon) == DualKatanaID) { if (get_user_NextAttack(id) <= 0.1) { ExecuteHamB(Ham_Weapon_SecondaryAttack, ENT_Weapon); new Anim = DUALKATANA_ANIM_STAB; set_weapon_TimeWeaponIdle(ENT_Weapon, DualKatana_AnimationTime[Anim]); set_user_NextAttack(id, DUALKATANA_STAB_DELAY); SendWeaponAnim(id, Anim, ENT_Weapon); } CurButton &= ~IN_ATTACK2; set_uc(uc_handle, UC_Buttons, CurButton); return FMRES_HANDLED; } } return FMRES_IGNORED; } public DualKatana_TakeDamage(const victim, pevInflictor, attacker, Float:flDamage, bitsDamageType) { if (is_user_alive(attacker) && get_user_dualkatana(attacker, true) && (bitsDamageType & DMG_BULLET)) SetHookChainArg(4, ATYPE_FLOAT, flDamage * DUALKATANA_DAMAGE); return HC_CONTINUE; } public DualKatana_Deploy_Post(ENT_Weapon) { if (is_valid_ent(ENT_Weapon)) { new id = pev(ENT_Weapon, pev_owner); if (is_user_alive(id) && get_weapon_key(ENT_Weapon) == DualKatanaID) { new Anim = DUALKATANA_ANIM_DRAW; set_weapon_model(id, DualKatanaModel_V, DualKatanaModel_P); set_weapon_TimeWeaponIdle(ENT_Weapon, DualKatana_AnimationTime[Anim]); set_user_NextAttack(id, DualKatana_AnimationTime[Anim]); SendWeaponAnim(id, Anim, ENT_Weapon); return HAM_HANDLED; } } return HAM_IGNORED; } public DualKatana_WeaponIdle(ENT_Weapon) { if (is_valid_ent(ENT_Weapon)) { new id = pev(ENT_Weapon, pev_owner); if (is_user_alive(id) && get_weapon_key(ENT_Weapon) == DualKatanaID && get_weapon_TimeWeaponIdle(ENT_Weapon) <= 0.1) { new Anim = DUALKATANA_ANIM_IDLE; set_weapon_TimeWeaponIdle(ENT_Weapon, DualKatana_AnimationTime[Anim]); set_weapon_model(id, DualKatanaModel_V, DualKatanaModel_P); SendWeaponAnim(id, Anim, ENT_Weapon); return HAM_HANDLED; } } return HAM_IGNORED; } public CMD_DualKatana(id) { engclient_cmd(id, weapon_dualkatana); return PLUGIN_HANDLED; } /////////////////////////////////////////////////////////////////////////////////////////////////// // Natives | //================================================================================================= public native_get_user_dualkatana(plugin_id, argc) return get_user_dualkatana(get_param(1), bool:get_param(2)); public native_set_user_dualkatana(plugin_id, argc) return set_weapon(get_param(1), CSW_DUALKATANA, DualKatanaID); public native_dualkatana_id() return DualKatanaID; /////////////////////////////////////////////////////////////////////////////////////////////////// // Stock | //================================================================================================= stock get_user_dualkatana(id, bool:CurrWeapon = false) return get_weapon(id, CSW_DUALKATANA, DualKatanaID, CurrWeapon); /////////////////////////////////////////////////////////////////////////////////////////////////// //-----------------------------------------| DualKatana |------------------------------------------ //========================================== sDs|Aragon* ==========================================Please i want someone if can help to modify the .sma similar to the .inl example but the same settings because i need to add new weapons to the shop. Like to convert similar like .inl Przeczytaj cały wpis
  6. Wczoraj
  7. Hello!, I wanted to get the server to place bots only on the axies team and proportionate the number of players on the allies team. If 5 players join allies, the server places 5 on axies. it's possible? as? Przeczytaj cały wpis
  8. Dorzucam tutaj kolejna mapę dla sieci 1S2K - am_minecraftfix
  9. Ostatni tydzień
  10. I would also like in that plugin for the votemap commands and all of others to be usable with "/" Code: Code: // vim: set ts=4 sw=4 tw=99 noet: // // AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). // Copyright (C) The AMX Mod X Development Team. // // This software is licensed under the GNU General Public License, version 3 or higher. // Additional exceptions apply. For full license details, see LICENSE.txt or visit: // https://alliedmods.net/amxmodx-license // // Admin Votes Plugin // #include <amxmodx> #include <amxmisc> new g_Answer[128] new g_optionName[4][64] new g_voteCount[4] new g_validMaps new g_yesNoVote new g_coloredMenus new g_voteCaller new g_Execute[256] new g_execLen new bool:g_execResult new Float:g_voteRatio public plugin_init() { register_plugin("Admin Votes", AMXX_VERSION_STR, "AMXX Dev Team") register_dictionary("adminvote.txt") register_dictionary("common.txt") register_dictionary("mapsmenu.txt") register_menucmd(register_menuid("Change map to "), MENU_KEY_1|MENU_KEY_2, "voteCount") register_menucmd(register_menuid("Choose map: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount") register_menucmd(register_menuid("Kick "), MENU_KEY_1|MENU_KEY_2, "voteCount") register_menucmd(register_menuid("Ban "), MENU_KEY_1|MENU_KEY_2, "voteCount") register_menucmd(register_menuid("Vote: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount") register_menucmd(register_menuid("The result: "), MENU_KEY_1|MENU_KEY_2, "actionResult") register_concmd("amx_votemap", "cmdVoteMap", ADMIN_KICK, "<map> [map] [map] [map]") register_concmd("amx_votekick", "cmdVoteKickBan", ADMIN_KICK, "<name or #userid>") register_concmd("amx_voteban", "cmdVoteKickBan", ADMIN_BAN, "<name or #userid>") register_concmd("amx_vote", "cmdVote", ADMIN_KICK, "<question> <answer#1> <answer#2>") register_concmd("amx_cancelvote", "cmdCancelVote", ADMIN_KICK, "- cancels last vote") register_clcmd("say /votemap", "cmdVoteMap", ADMIN_KICK) g_coloredMenus = colored_menus() } public cmdCancelVote(id, level, cid) { if (!cmd_access(id, level, cid, 0)) return PLUGIN_HANDLED if (task_exists(99889988, 1)) { new authid[32], name[MAX_NAME_LENGTH] get_user_authid(id, authid, charsmax(authid)) get_user_name(id, name, charsmax(name)) log_amx("Vote: ^"%s<%d><%s><>^" cancel vote session", name, get_user_userid(id), authid) new msg[256]; for (new i = 1; i <= MaxClients; i++) { if (is_user_connected(i) && !is_user_bot(i)) { // HACK: ADMIN_CANC_VOTE_{1,2} keys were designed very poorly. Remove all : and %s in it. LookupLangKey(msg, charsmax(msg), "ADMIN_CANC_VOTE_1", i); replace_all(msg, charsmax(msg), "%s", ""); replace_all(msg, charsmax(msg), ":", ""); trim(msg); show_activity_id(i, id, name, msg); } } console_print(id, "%L", id, "VOTING_CANC") client_print(0,print_chat,"%L",LANG_PLAYER,"VOTING_CANC") remove_task(99889988, 1) set_cvar_float("amx_last_voting", get_gametime()) } else console_print(id, "%L", id, "NO_VOTE_CANC") return PLUGIN_HANDLED } public delayedExec(cmd[]) server_cmd("%s", cmd) public autoRefuse() { log_amx("Vote: %L", "en", "RES_REF") client_print(0, print_chat, "%L", LANG_PLAYER, "RES_REF") } public actionResult(id, key) { remove_task(4545454) switch (key) { case 0: { set_task(2.0, "delayedExec", 0, g_Execute, g_execLen) log_amx("Vote: %L", "en", "RES_ACCEPTED") client_print(0, print_chat, "%L", LANG_PLAYER, "RES_ACCEPTED") } case 1: autoRefuse() } return PLUGIN_HANDLED } public checkVotes() { new best = 0 if (!g_yesNoVote) { for (new a = 0; a < 4; ++a) if (g_voteCount[a] > g_voteCount[best]) best = a } new votesNum = g_voteCount[0] + g_voteCount[1] + g_voteCount[2] + g_voteCount[3] new iRatio = votesNum ? floatround(g_voteRatio * float(votesNum), floatround_ceil) : 1 new iResult = g_voteCount[best] new players[MAX_PLAYERS], pnum, i get_players(players, pnum, "c") if (iResult < iRatio) { new lVotingFailed[64] for (i = 0; i < pnum; i++) { format(lVotingFailed, 63, "%L", players[i], "VOTING_FAILED") if (g_yesNoVote) client_print(players[i], print_chat, "%L", players[i], "VOTING_RES_1", lVotingFailed, g_voteCount[0], g_voteCount[1], iRatio) else client_print(players[i], print_chat, "%L", players[i], "VOTING_RES_2", lVotingFailed, iResult, iRatio) } format(lVotingFailed, 63, "%L", "en", "VOTING_FAILED") log_amx("Vote: %s (got ^"%d^") (needed ^"%d^")", lVotingFailed, iResult, iRatio) return PLUGIN_CONTINUE } g_execLen = format(g_Execute, charsmax(g_Execute), g_Answer, g_optionName[best]) + 1 if (g_execResult) { g_execResult = false if (is_user_connected(g_voteCaller)) { new menuBody[512], lTheResult[32], lYes[16], lNo[16] format(lTheResult, charsmax(lTheResult), "%L", g_voteCaller, "THE_RESULT") format(lYes, charsmax(lYes), "%L", g_voteCaller, "YES") format(lNo, charsmax(lNo), "%L", g_voteCaller, "NO") new len = format(menuBody, charsmax(menuBody), g_coloredMenus ? "\y%s: \w%s^n^n" : "%s: %s^n^n", lTheResult, g_Execute) len += format(menuBody[len], charsmax(menuBody) - len, g_coloredMenus ? "\y%L^n\w" : "%L^n", g_voteCaller, "WANT_CONTINUE") format(menuBody[len], charsmax(menuBody) - len, "^n1. %s^n2. %s", lYes, lNo) show_menu(g_voteCaller, 0x03, menuBody, 10, "The result: ") set_task(10.0, "autoRefuse", 4545454) } else set_task(2.0, "delayedExec", 0, g_Execute, g_execLen) } new lVotingSuccess[32] for (i = 0; i < pnum; i++) { format(lVotingSuccess, charsmax(lVotingSuccess), "%L", players[i], "VOTING_SUCCESS") client_print(players[i], print_chat, "%L", players[i], "VOTING_RES_3", lVotingSuccess, iResult, iRatio, g_Execute) } format(lVotingSuccess, charsmax(lVotingSuccess), "%L", "en", "VOTING_SUCCESS") log_amx("Vote: %s (got ^"%d^") (needed ^"%d^") (result ^"%s^")", lVotingSuccess, iResult, iRatio, g_Execute) return PLUGIN_CONTINUE } public voteCount(id, key) { if (get_cvar_num("amx_vote_answers")) { new name[MAX_NAME_LENGTH] get_user_name(id, name, charsmax(name)) if (g_yesNoVote) client_print(0, print_chat, "%L", LANG_PLAYER, key ? "VOTED_AGAINST" : "VOTED_FOR", name) else client_print(0, print_chat, "%L", LANG_PLAYER, "VOTED_FOR_OPT", name, key + 1) } ++g_voteCount[key] return PLUGIN_HANDLED } public cmdVoteMap(id, level, cid) { if (!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED new Float:voting = get_cvar_float("amx_last_voting") if (voting > get_gametime()) { console_print(id, "%L", id, "ALREADY_VOTING") return PLUGIN_HANDLED } if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) { console_print(id, "%L", id, "VOTING_NOT_ALLOW") return PLUGIN_HANDLED } new argc = read_argc() if (argc > 5) argc = 5 g_validMaps = 0 g_optionName[0][0] = 0 g_optionName[1][0] = 0 g_optionName[2][0] = 0 g_optionName[3][0] = 0 for (new i = 1; i < argc; ++i) { read_argv(i, g_optionName[g_validMaps], 31) if (is_map_valid(g_optionName[g_validMaps])) g_validMaps++ } if (g_validMaps == 0) { new lMaps[16] format(lMaps, charsmax(lMaps), "%L", id, (argc == 2) ? "MAP_IS" : "MAPS_ARE") console_print(id, "%L", id, "GIVEN_NOT_VALID", lMaps) return PLUGIN_HANDLED } new menu_msg[256], len = 0 new keys = 0 if (g_validMaps > 1) { keys = MENU_KEY_0 len = format(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%L: \w^n^n" : "%L: ^n^n", LANG_SERVER, "CHOOSE_MAP") new temp[128] for (new a = 0; a < g_validMaps; ++a) { format(temp, charsmax(temp), "%d. %s^n", a+1, g_optionName[a]) len += copy(menu_msg[len], charsmax(menu_msg) - len, temp) keys |= (1<<a) } format(menu_msg[len], charsmax(menu_msg) - len, "^n0. %L", LANG_SERVER, "NONE") g_yesNoVote = 0 } else { new lChangeMap[32], lYes[16], lNo[16] format(lChangeMap, charsmax(lChangeMap), "%L", LANG_SERVER, "CHANGE_MAP_TO") format(lYes, charsmax(lYes), "%L", LANG_SERVER, "YES") format(lNo, charsmax(lNo), "%L", LANG_SERVER, "NO") format(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%s %s?\w^n^n1. %s^n2. %s" : "%s %s?^n^n1. %s^n2. %s", lChangeMap, g_optionName[0], lYes, lNo) keys = MENU_KEY_1|MENU_KEY_2 g_yesNoVote = 1 } new authid[32], name[MAX_NAME_LENGTH] get_user_authid(id, authid, charsmax(authid)) get_user_name(id, name, charsmax(name)) if (argc == 2) log_amx("Vote: ^"%s<%d><%s><>^" vote map (map ^"%s^")", name, get_user_userid(id), authid, g_optionName[0]) else log_amx("Vote: ^"%s<%d><%s><>^" vote maps (map#1 ^"%s^") (map#2 ^"%s^") (map#3 ^"%s^") (map#4 ^"%s^")", name, get_user_userid(id), authid, g_optionName[0], g_optionName[1], g_optionName[2], g_optionName[3]) new msg[256]; for (new i = 1; i <= MaxClients; i++) { if (is_user_connected(i) && !is_user_bot(i)) { // HACK: ADMIN_VOTE_MAP_{1,2} keys were designed very poorly. Remove all : and %s in it. LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_MAP_1", i); replace_all(msg, charsmax(msg), "%s", ""); replace_all(msg, charsmax(msg), ":", ""); trim(msg); show_activity_id(i, id, name, msg); } } g_execResult = true new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 set_cvar_float("amx_last_voting", get_gametime() + vote_time) g_voteRatio = get_cvar_float("amx_votemap_ratio") g_Answer = "changelevel %s" show_menu(0, keys, menu_msg, floatround(vote_time), (g_validMaps > 1) ? "Choose map: " : "Change map to ") set_task(vote_time, "checkVotes", 99889988) g_voteCaller = id console_print(id, "%L", id, "VOTING_STARTED") g_voteCount = {0, 0, 0, 0} return PLUGIN_HANDLED } public cmdVote(id, level, cid) { if (!cmd_access(id, level, cid, 4)) return PLUGIN_HANDLED new Float:voting = get_cvar_float("amx_last_voting") if (voting > get_gametime()) { console_print(id, "%L", id, "ALREADY_VOTING") return PLUGIN_HANDLED } if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) { console_print(id, "%L", id, "VOTING_NOT_ALLOW") return PLUGIN_HANDLED } new quest[48] read_argv(1, quest, charsmax(quest)) trim(quest); if (containi(quest, "sv_password") != -1 || containi(quest, "rcon_password") != -1) { console_print(id, "%L", id, "VOTING_FORBIDDEN") return PLUGIN_HANDLED } new count=read_argc(); for (new i=0;i<4 && (i+2)<count;i++) { read_argv(i+2, g_optionName[i], charsmax(g_optionName[])); } new authid[32], name[MAX_NAME_LENGTH] get_user_authid(id, authid, charsmax(authid)) get_user_name(id, name, charsmax(name)) log_amx("Vote: ^"%s<%d><%s><>^" vote custom (question ^"%s^") (option#1 ^"%s^") (option#2 ^"%s^")", name, get_user_userid(id), authid, quest, g_optionName[0], g_optionName[1]) new msg[256]; for (new i = 1; i <= MaxClients; i++) { if (is_user_connected(i) && !is_user_bot(i)) { // HACK: ADMIN_VOTE_CUS_{1,2} keys were designed very poorly. Remove all : and %s in it. LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_CUS_1", i); replace_all(msg, charsmax(msg), "%s", ""); replace_all(msg, charsmax(msg), ":", ""); trim(msg); show_activity_id(i, id, name, msg); } } new menu_msg[512], lVote[16] format(lVote, charsmax(lVote), "%L", LANG_SERVER, "VOTE") count-=2; if (count>4) { count=4; } // count now shows how many options were listed new keys=0; for (new i=0;i<count;i++) { keys |= (1<<i); } new len=formatex(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%s: %s\w^n^n" : "%s: %s^n^n", lVote, quest); for (new i=0;i<count;i++) { len+=formatex(menu_msg[len], charsmax(menu_msg) - len ,"%d. %s^n",i+1,g_optionName[i]); } g_execResult = false new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 set_cvar_float("amx_last_voting", get_gametime() + vote_time) g_voteRatio = get_cvar_float("amx_vote_ratio") replace_all(quest, charsmax(quest), "%", ""); format(g_Answer, charsmax(g_Answer), "%s - ^"%%s^"", quest) show_menu(0, keys, menu_msg, floatround(vote_time), "Vote: ") set_task(vote_time, "checkVotes", 99889988) g_voteCaller = id console_print(id, "%L", id, "VOTING_STARTED") g_voteCount = {0, 0, 0, 0} g_yesNoVote = 0 return PLUGIN_HANDLED } public cmdVoteKickBan(id, level, cid) { if (!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED new Float:voting = get_cvar_float("amx_last_voting") if (voting > get_gametime()) { console_print(id, "%L", id, "ALREADY_VOTING") return PLUGIN_HANDLED } if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) { console_print(id, "%L", id, "VOTING_NOT_ALLOW") return PLUGIN_HANDLED } new cmd[32] read_argv(0, cmd, charsmax(cmd)) new voteban = equal(cmd, "amx_voteban") new arg[32] read_argv(1, arg, charsmax(arg)) new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF) if (!player) return PLUGIN_HANDLED if (voteban && is_user_bot(player)) { new imname[MAX_NAME_LENGTH] get_user_name(player, imname, charsmax(imname)) console_print(id, "%L", id, "ACTION_PERFORMED", imname) return PLUGIN_HANDLED } new keys = MENU_KEY_1|MENU_KEY_2 new menu_msg[256], lYes[16], lNo[16], lKickBan[16] format(lYes, charsmax(lYes), "%L", LANG_SERVER, "YES") format(lNo, charsmax(lNo), "%L", LANG_SERVER, "NO") format(lKickBan, charsmax(lKickBan), "%L", LANG_SERVER, voteban ? "BAN" : "KICK") ucfirst(lKickBan) get_user_name(player, arg, charsmax(arg)) format(menu_msg, charsmax(menu_msg), g_coloredMenus ? "\y%s %s?\w^n^n1. %s^n2. %s" : "%s %s?^n^n1. %s^n2. %s", lKickBan, arg, lYes, lNo) g_yesNoVote = 1 new bool:ipban=false; if (voteban) { get_user_authid(player, g_optionName[0], charsmax(g_optionName[])); // Do the same check that's in plmenu to determine if this should be an IP ban instead if (equal("4294967295", g_optionName[0]) || equal("HLTV", g_optionName[0]) || equal("STEAM_ID_LAN", g_optionName[0]) || equali("VALVE_ID_LAN", g_optionName[0])) { get_user_ip(player, g_optionName[0], charsmax(g_optionName[]), 1); ipban=true; } } else { num_to_str(get_user_userid(player), g_optionName[0], charsmax(g_optionName[])) } new authid[32], name[MAX_NAME_LENGTH] get_user_authid(id, authid, charsmax(authid)) get_user_name(id, name, charsmax(name)) log_amx("Vote: ^"%s<%d><%s><>^" vote %s (target ^"%s^")", name, get_user_userid(id), authid, voteban ? "ban" : "kick", arg) new msg[256]; new right[256]; new dummy[1]; for (new i = 1; i <= MaxClients; i++) { if (is_user_connected(i) && !is_user_bot(i)) { formatex(lKickBan, charsmax(lKickBan), "%L", i, voteban ? "BAN" : "KICK"); // HACK: ADMIN_VOTE_FOR{1,2} keys are really weird. Tokenize and ignore the text before the : LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_FOR_1", i); strtok(msg, dummy, 0, right, charsmax(right), ':'); trim(right); show_activity_id(i, id, name, right, lKickBan, arg); } } g_execResult = true new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 set_cvar_float("amx_last_voting", get_gametime() + vote_time) g_voteRatio = get_cvar_float(voteban ? "amx_voteban_ratio" : "amx_votekick_ratio") if (voteban) { if (ipban==true) { g_Answer = "addip 30.0 %s"; } else { g_Answer = "banid 30.0 %s kick"; } } else { g_Answer = "kick #%s"; } show_menu(0, keys, menu_msg, floatround(vote_time), voteban ? "Ban " : "Kick ") set_task(vote_time, "checkVotes", 99889988) g_voteCaller = id console_print(id, "%L", id, "VOTING_STARTED") g_voteCount = {0, 0, 0, 0} return PLUGIN_HANDLED } Przeczytaj cały wpis
  11. A plugin for Setting a Client's Team, this was mainly made so admins can either force bots onto a specific team or choose a team for someone. In this plugin you can only specify all the way up to TeamNum 5 which is the max for Open Fortress and might be about the same for Team Fortress 2 Classic. This is another command invoking plugin that uses ent_fire as the base to set a target's team which means sv_cheats must be enabled and that person must have the rights to use ent_fire in the first place. Some of the code was largely based off of the plugin cexec, which i had originally made this idea into a small plugin that when combined with cexec would allow the admin to change the team of a client, but now you can do it all in one here! Cvars: sm_setteam <CLIENT> <TEAMNUMBER> Attached Files Setteam.smx (4.7 KB) Get Plugin or Get Source (Setteam.sp - 1.9 KB) Wyświetl pełny artykuł
  12. A plugin that was made for admins to put the addcond conditions onto specified clients when sv_cheats 1 is enabled, you'd typically need to combine sv_cheats with some form of anti cheat command plugin that makes sv_cheats relatively useless for non-admin clients. So have fun applying conditions to your players! Keep in mind that this plugin can only invoke the addcond command and doesn't use it's own custom condtion functions to make conditions apply to players, as that would be too complicated so instead we use addcond as the base and apply the command to the specified target! Btw this was also mainly centered around TF2 and it's sourcemod's so feel free to use this plugin on those games aswell! Cvars: sm_addcond <Client> <Condition Number> Attached Files AddcondPlugin.smx (4.7 KB) Get Plugin or Get Source (AddcondPlugin.sp - 2.2 KB) Wyświetl pełny artykuł
  13. This is a simple plugin who add the country of the player in the chat when he join the game. Ex: Ranily has joined the game from germany No CVAR command for now, and work in english only, but new update can come soon ! This plugins doesn't need anything, just put the .smx on the /addons/sourcemod/plugins folder and that's it ! Source Code Attached Files Get Plugin or Get Source (Country_Message.sp - 727 Bytes) Wyświetl pełny artykuł
  14. hello im currently making a cz tour of duty that adds cut content of condition zero im currently finding a m60 plugin i kept searching but the other doesnt work if anyone knows a m60 plugin please help Przeczytaj cały wpis
  15. This is a simple plugin who add the country of the player in the chat when he join the game. Ex: Ranily has joined the game from germany This plugins doesn't need anything, just put the .smx on the /addons/sourcemod/plugins folder and that's it ! Source Code Attached Files Get Plugin or Get Source (Country_Message.sp - 727 Bytes) Przeczytaj cały wpis
  16. MYGO.pl

    RSSWelcome

    Hi Iv been looking for a plugin cs1.6 or somehow to welcome every player that joins the server with a welcome ie welcome "new player name " to "server name" This message too come up in the chat messages area bottom left with all the other messages, a colour choice would be good also. I sure its out there but I cant find it or anything like it, hopefully someone out there does know. Thanks Przeczytaj cały wpis
  17. https://dev-cs.ru/resources/494/ I saw it from this website Because I couldn’t find any relevant content here (or I didn’t see it myself) Players will throw C4 randomly or in places where it cannot be picked up. Attached Files Get Plugin or Get Source (c4_drop_0_7.sma - 2.0 KB) Przeczytaj cały wpis
  18. Descriptionsince the compatibility of my restart empty server plugin is not perfect, I deviced to provide this plugin. It can load custom commands on server empty. Cvars PHP Code: load_command_on_empty_path "data/load_command_on_empty.txt" Change log Spoiler Code: 1.0 (2024-04-30: -init public release. Configs installationcreate a file named "load_command_on_empty.txt" at "sourcemod/data/", put commands into each line of the file. if you changed the "path" cvar, you have to change the file name or path too! Attached Files Get Plugin or Get Source (load_command_on_empty.sp - 2.1 KB) Wyświetl pełny artykuł
  19. I decided after a while of toying around the internet trying to find ways to put a calculator into my favorite source engine game, i came up with this handy tool to solve all your basic math problems! Since i couldn't find anything on the internet about a sourcemod calculator plugin i decided to make this for the community to play with! This was made purely for fun but i wanted to share it with you all! What plugin can do: - Calculate Addition ( + ) - Calculate Subtraction ( - ) - Calculate Multiplication ( * ) - Calculate Division ( / ) However the division portion may be finnicky because machines usually dont get division correct... Cvars: sm_calc (<NUMBER> [+,-,*,/] <LAST NUMBER> ) Attached Files sm_calc.smx (4.6 KB) Get Plugin or Get Source (sm_calc.sp - 1.6 KB) Wyświetl pełny artykuł
  20. This is a plugin designed to allow admins to effectively ban or unban a user by their STEAM_ID, this plugin also comes with a built in feature for grabbing the STEAM_ID of a client that is ready to be banned from the server and the plugin automatically intercepts the STEAM_ID as it is connect and essentially bans them from the server on that one account This plugin logs the STEAM_ID's to a configuration file called bannedplayers.ini in your configs folder this is where the plugin stores all available STEAM_ID's of banned users and saves them until unbanned to which the ID's will be promptly removed allowing the user to play the server again. Attached Files sm_banbysteamid.smx (6.7 KB) Get Plugin or Get Source (sm_banbysteamid.sp - 5.2 KB) Wyświetl pełny artykuł
  21. Sprawdz - > https://github.com/sapsanDev/CS2--DemoRecoder
  22. Descriptionreplacement for Change Map On Empty and Auto Enable/Disable "sb_all_bot_game". knowns work for linux. Current Tested Support Game:L4D2 Cvars PHP Code: restart_server_on_empty_enable "1" restart_server_on_empty_log "1" CreditsDragokas - for the original plugin Restart Empty Server (or Map) Change log Spoiler Code: 1.2 (2024-04-29: -prevent unload crash report extenstion by "exit/quit". 1.1 (2024-04-29: -add response for failed to exec "crash" command. 1.0 (2024-04-29: -init public release. Attached Files Get Plugin or Get Source (restart_server_on_empty.sp - 3.3 KB) Wyświetl pełny artykuł
  23. I'm using this plugin, when there are only 2 players left, you can challenge your opponent to a knife duel by hitting the wall with the knife 3 times. There is one bug though. If someone challenges you and you don't accept or refuse and let the menu open until next round, you can accept the challenge then and everyone is forced into the duel and get stripped of their weapons. How can I fix that? I've tried closing the menu automatically when a new round starts, but nothing seems to work. PHP Code: #include <amxmodx> #include <fakemeta> #include <hamsandwich> #define PLUGIN "CS Revo: Knife Duel" #define VERSION "1.0" #define AUTHOR "Alka | Wilian M." #define CBASE_CURRWPN_ENT 373 #define OFFSET_ENT_TO_INDEX 43 #define PREFIX_CHAT "^4[ ^1CS Revo! ^4]" new const g_szKnifeSound[] = "weapons/knife_hitwall1.wav"; new const g_szSpawnClassname[] = "info_player_deathmatch"; new Float:g_fHit[33]; new iHitCount[33]; new g_iChallenged, g_iChallenger; new Float:g_vKnifeOrigin[2][3]; new bool:g_bInChallenge; new bool:g_bProtect; new g_iTimer; enum _:max_cvars { CVAR_COUNT = 0, CVAR_TIMER, CVAR_MAXDISTANCE, CVAR_PROTECTION, CVAR_ANNOUNCE, CVAR_RESET }; new g_Pcvar[max_cvars]; new g_iFwdSpawn; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_forward(FM_EmitSound, "fwd_EmitSound", 1); register_forward(FM_PlayerPreThink, "fwd_PlayerPreThink_post", 1); RegisterHam(Ham_Killed, "player", "fwd_Killed", 1); unregister_forward(FM_Spawn, g_iFwdSpawn, 1); register_logevent("logevent_RoundEnd", 2, "1=Round_End", "1=Round_Draw"); g_Pcvar[CVAR_COUNT] = register_cvar("kd_knifecount", "3"); g_Pcvar[CVAR_TIMER] = register_cvar("kd_preparetime", "10"); g_iTimer = get_pcvar_num(g_Pcvar[CVAR_TIMER]); g_Pcvar[CVAR_PROTECTION] = register_cvar("kd_protection", "1"); g_Pcvar[CVAR_MAXDISTANCE] = register_cvar("kd_maxdistance", "600"); g_Pcvar[CVAR_ANNOUNCE] = register_cvar("kd_announce", "1"); g_Pcvar[CVAR_RESET] = register_cvar("kd_resethp", "1") } public plugin_precache() g_iFwdSpawn = register_forward(FM_Spawn, "fwd_Spawn", 1); public client_disconnected(id) { if((id == g_iChallenged) || (id == g_iChallenger)) { g_bInChallenge = false; g_bProtect = false; } } public fwd_Spawn(ent) { if(!pev_valid(ent)) return FMRES_IGNORED; static szClassname[32]; pev(ent, pev_classname, szClassname, sizeof szClassname - 1); if(equal(szClassname, g_szSpawnClassname)) { if(vec_null(g_vKnifeOrigin[0])) { pev(ent, pev_origin, g_vKnifeOrigin[0]); } else if(!vec_null(g_vKnifeOrigin[0]) && vec_null(g_vKnifeOrigin[1])) { static Float:vTmp[3]; pev(ent, pev_origin, vTmp); if((300.0 <= vector_distance(g_vKnifeOrigin[0], vTmp) < 600.0)) g_vKnifeOrigin[1] = vTmp; } } return FMRES_IGNORED; } public fwd_EmitSound(id, channel, const sound[]) { if(!is_user_alive(id)) return FMRES_IGNORED; if(!equal(sound, g_szKnifeSound)) return FMRES_IGNORED; static Float:fGmTime; fGmTime = get_gametime(); if((fGmTime - g_fHit[id]) >= 1.0) { iHitCount[id] = 0; g_fHit[id] = fGmTime; } ++iHitCount[id]; g_fHit[id] = fGmTime; if((iHitCount[id] >= get_pcvar_num(g_Pcvar[CVAR_COUNT])) && check_players() && !g_bInChallenge) { new iOpponent = get_opponent(3 - get_user_team(id)); if(!iOpponent) return FMRES_IGNORED; fnChallenge(id, iOpponent); iHitCount[id] = 0; } return FMRES_IGNORED; } public fwd_PlayerPreThink_post(id) { if(!is_user_alive(id) || !g_bInChallenge) return FMRES_IGNORED; static iWpn; iWpn = get_pdata_cbase(id, CBASE_CURRWPN_ENT); if(pev_valid(iWpn)) { if(get_pdata_int(iWpn, OFFSET_ENT_TO_INDEX) != CSW_KNIFE) engclient_cmd(id, "weapon_knife"); } static iOpponent; if(id == g_iChallenged) iOpponent = g_iChallenger; else iOpponent = g_iChallenged; if(!is_user_connected(iOpponent)) return FMRES_IGNORED; if((fm_get_entity_distance(id, iOpponent) >= get_pcvar_float(g_Pcvar[CVAR_MAXDISTANCE])) && g_bProtect) { static Float:vVel[3]; fm_get_speed_vector2(id, iOpponent, 100.0, vVel); set_pev(id, pev_velocity, vVel); } return FMRES_IGNORED; } public fwd_Killed(id, idattacker, shouldgib) { if(!get_pcvar_num(g_Pcvar[CVAR_ANNOUNCE])) return HAM_IGNORED; if(check_players()) { for(new i = 0 ; i <= MaxClients ; i++) { if(!is_user_alive(i)) continue; client_print_color(i, print_team_default, "%s ^3You can challenge your enemy to a knife duel hitting the wall 3 times!", PREFIX_CHAT) } } return HAM_IGNORED; } public fnChallenge(id, opponent) { new szName[32], szOppName[32]; get_user_name(id, szName, sizeof szName - 1); get_user_name(opponent, szOppName, sizeof szOppName - 1); new szTitle[64]; formatex(szTitle, sizeof szTitle - 1, "\r%s \yis challenging you to a knife duel", szName); new iMenu = menu_create(szTitle, "menu_MainHandler", 0); menu_additem(iMenu, "Accept", "1", 0, -1); menu_additem(iMenu, "No, thanks", "2", 0, -1); menu_setprop(iMenu, MPROP_EXIT, MEXIT_NEVER); menu_display(opponent, iMenu, 0); client_print_color(0, print_team_default, "%s ^4%s ^3challenged ^4%s ^3to a knife duel.", PREFIX_CHAT, szName, szOppName) g_iChallenger = id; g_iChallenged = opponent; g_bInChallenge = true; } public menu_MainHandler(id, menu, item) { if(!is_user_connected(id)) return 1; new szData[6], iAccess, iCallBack; menu_item_getinfo(menu, item, iAccess, szData, sizeof szData - 1, _, _, iCallBack); new iKey = str_to_num(szData); new szName[32]; get_user_name(id, szName, sizeof szName - 1); switch(iKey) { case 1: { client_print_color(0, print_team_default, "%s ^4%s ^3accepted the knife duel.", PREFIX_CHAT, szName) fnStartDuel(); } case 2: { client_print_color(0, print_team_default, "%s ^4%s ^3refused the knife duel.", PREFIX_CHAT, szName) g_bInChallenge = false; } } return 1; } public fnStartDuel() { if(!is_user_connected(g_iChallenged) || !is_user_connected(g_iChallenger)) return; engfunc(EngFunc_SetOrigin, g_iChallenged, g_vKnifeOrigin[0]); engfunc(EngFunc_SetOrigin, g_iChallenger, g_vKnifeOrigin[1]); fm_entity_set_aim(g_iChallenged, g_iChallenger, 0); fm_entity_set_aim(g_iChallenger, g_iChallenged, 0); fm_set_user_godmode(g_iChallenged, 1); fm_set_user_godmode(g_iChallenger, 1); if(get_pcvar_num(g_Pcvar[CVAR_RESET])) { set_pev(g_iChallenged, pev_health, 100.0); set_pev(g_iChallenger, pev_health, 100.0); } set_task(1.0, "taskDuelThink", 'x', "", 0, "b", 0); if(get_pcvar_num(g_Pcvar[CVAR_PROTECTION])) g_bProtect = true; } public taskDuelThink() { if(g_iTimer > 0) { set_hudmessage(255, 100, 0, -1.0, 0.3, 0, 6.0, 1.0, 0.1, 0.9, 1); show_hudmessage(0, "Countdown: %d", g_iTimer--); } else { set_hudmessage(255, 100, 0, -1.0, 0.3, 0, 6.0, 1.0, 0.1, 0.5, 1); show_hudmessage(0, "The duel started!"); g_iTimer = get_pcvar_num(g_Pcvar[CVAR_TIMER]); remove_task('x'); for(new i = 0 ; i <= MaxClients ; i++) { if(!is_user_alive(i)) continue; fm_set_user_godmode(i, 0); } } } public logevent_RoundEnd() { g_bInChallenge = false; g_bProtect = false; } stock fm_entity_set_aim(id, ent, bone = 0) { if(!is_user_connected(id) || !pev_valid(ent)) return 0; new Float:vOrigin[3]; pev(ent, pev_origin, vOrigin); new Float:vEntOrigin[3], Float:vAngles[3]; if(bone) engfunc(EngFunc_GetBonePosition, id, bone, vEntOrigin, vAngles); else pev(id, pev_origin, vEntOrigin); vOrigin[0] -= vEntOrigin[0]; vOrigin[1] -= vEntOrigin[1]; vOrigin[2] -= vEntOrigin[2]; new Float:v_length; v_length = vector_length(vOrigin); new Float:vAimVector[3]; vAimVector[0] = vOrigin[0] / v_length; vAimVector[1] = vOrigin[1] / v_length; vAimVector[2] = vOrigin[2] / v_length; new Float:vNewAngles[3]; vector_to_angle(vAimVector, vNewAngles); vNewAngles[0] *= -1; if(vNewAngles[1] > 180.0) vNewAngles[1] -= 360; if(vNewAngles[1] < -180.0) vNewAngles[1] += 360; if(vNewAngles[1] == 180.0 || vNewAngles[1] == -180.0) vNewAngles[1] = -179.9; set_pev(id, pev_angles, vNewAngles); set_pev(id, pev_fixangle, 1); return 1; } stock vec_null(Float:vec[3]) { if(!vec[0] && !vec[1] && !vec[2]) return 1; return 0; } stock bool:check_players() { new iNum[2]; for(new i = 1 ; i <= MaxClients ; i++) { if(!is_user_alive(i)) continue; if(get_user_team(i) == 1) ++iNum[0]; else if(get_user_team(i) == 2) ++iNum[1]; } if((iNum[0] == 1) && (iNum[1] == 1)) return true; return false; } stock get_opponent(team) { for(new i = 0 ; i <= MaxClients ; i++) { if(!is_user_alive(i)) continue; if(get_user_team(i) == team) return i; } return 0; } stock fm_set_user_godmode(index, godmode = 0) { set_pev(index, pev_takedamage, godmode == 1 ? DAMAGE_NO : DAMAGE_AIM); return 1; } stock fm_get_speed_vector2(ent1, ent2, Float:speed, Float:new_velocity[3]) { if(!pev_valid(ent1) || !pev_valid(ent2)) return 0; static Float:vOrigin1[3]; pev(ent1, pev_origin, vOrigin1); static Float:vOrigin2[3]; pev(ent2, pev_origin, vOrigin2); new_velocity[0] = vOrigin2[0] - vOrigin1[0]; new_velocity[1] = vOrigin2[1] - vOrigin1[1]; new_velocity[2] = vOrigin2[2] - vOrigin1[2]; new Float:fNum = floatsqroot(speed * speed / (new_velocity[0] * new_velocity[0] + new_velocity[1] * new_velocity[1] + new_velocity[2] * new_velocity[2])); new_velocity[0] *= fNum; new_velocity[1] *= fNum; new_velocity[2] *= fNum; return 1; } stock Float:fm_get_entity_distance(ent1, ent2) { if(!pev_valid(ent1) || !pev_valid(ent2)) return 0.0; static Float:vOrigin1[3]; pev(ent1, pev_origin, vOrigin1); static Float:vOrigin2[3]; pev(ent2, pev_origin, vOrigin2); return vector_distance(vOrigin1, vOrigin2); } Przeczytaj cały wpis
  24. Hodża Efendi

    Kupno serwera

    Witam serdecznie z miła chęcią kupie serwer CS 1.6 najbardziej interesuje mn cod mod lub dd2 jeśli chciałaby ktoś sprzedać proszę cenę i rodzaj modu na priv
  25. Simple plugin to regen tank health with configurable delay and option to regen only player tanks. Cvars: Quote: // Time in seconds for a healing tick of 'tank MAX HP / l4d2_tank_regen_quotient' // - // Default: "0.4" l4d2_tank_regen_delay "0.4" // Wether or not tank bots should regen their hp | 0 - disabled / 1 - enabled // - // Default: "0" l4d2_tank_regen_heal_bots "0" // Multiplier to heal over tank MAX HP // - // Default: "1.0" l4d2_tank_regen_overheal_multiplier "1.0" // Amount that the MAX HP of the tank will be divided by // - // Default: "320.0" l4d2_tank_regen_quotient "320.0" Changelog: Code: 1.0 - First ReleaseRequired: Left 4 DHooks Direct Clicking 'Get Plugin' won't work, download the .smx and put it into sourcemod\plugins or download source and compile it yourself. Attached Files tankHPRegen.smx (6.6 KB) Get Plugin or Get Source (tankHPRegen.sp - 3.8 KB) Wyświetl pełny artykuł
  26. Witam, szukam skryptu do automatycznego pakowania demek do rar, oraz przesyłanie demek na moją stronę www i zezwolenie na pobierania ich przez każdego.
  27. Hello This is a grenade known mainly from the Worms game series. It works similarly to the original item from the above-mentioned game. The plugin works in Zombie Plague 4.3 and classic mode Cvars: zp_holygrenade_dmg "2500" // Holy grenade damage. Defult: 2500 zp_holygrenade_cost "20" // Price holy grenade. Default: 20 Spoiler Version: 2.1 Presentation: Attached Files Get Plugin or Get Source (holy_grenade.sma - 9.1 KB) Get Plugin or Get Source (zp_holy_grenade.sma - 9.1 KB) HolyHandGrenade2.1.zip (1,021.1 KB) Przeczytaj cały wpis
  28. Hello! I've been looking everywhere around the internet but i cannot seem to find this type of Zombie class and download it! Here are some information i know about since i see some videos about the class: -It was heavily known as the "Hunter Zombie" -(IMPORTANT) Once you were infected you were given this as a chatmessage: "Press "G" (or O) To adjust your jump height/gravity" (Now this is not 100% what it said but its really close) I've tried looking at every hunter zombie but there's like 2-3 and those do not have the option to adjust or change your jump height or gravity! If anyone could help me, i would appreciate it alot! Przeczytaj cały wpis
  1. Pokaż więcej elementów aktywności
×
×
  • Dodaj nową pozycję...