Rules FAQ Members List Search Register Login

 Raised This Month: \$ Target: \$400 0%

Tote
Senior Member
Join Date: Jul 2023
04-27-2024 , 08:55   Re: Knife hit knockback
#21

Quote:
 Originally Posted by SaraAki Tote,now work only when attack enemy players,but also only when i kill player,killed player get knockbacked.Maybe problem is in velocity stock?
Ofcourse it's going to happen, thats what ur plugin function does. It's not even considered a "problem".
Natsheh
Veteran Member
Join Date: Sep 2012
 05-01-2024 , 09:26   Re: Knife hit knockback #22 PHP Code: ``` stock create_velocity_vector(victim, attacker, Float:velocity[3]){    if(!is_user_alive(victim) || !is_user_alive(attacker))        return 0;    new Float:vicorigin[3], Float:attorigin[3];    entity_get_vector(victim, EV_VEC_origin, vicorigin);    entity_get_vector(attacker, EV_VEC_origin, attorigin);    new Float:origin_diff[3];    for(new i = 0; i < 3; i++)        origin_diff[i] = vicorigin[i] - attorigin[i];    new Float:fLen = get_distance_f(vicorigin, attorigin);    if(fLen <= 0.0) return 0;    for(new i = 0; i < 3; i++)    {        origin_diff[i] /= fLen;    }    new Float:knock_force = get_pcvar_float(cvar_knock_force);    velocity[0] = (origin_diff[0] * knock_force );    velocity[1] = (origin_diff[1] * knock_force );    velocity[2] = (origin_diff[2] * knock_force) + random_float(200.0, 275.0);    return 1;}  ``` Here you go this function should make more sense now, make sure to post in the proper section.. __________________ @Jailbreak Main Mod v2.7.0 100% @User Tag Prefix 100% done ! @Mystery Box 100% done ! @VIP System 100% done ! Last edited by Natsheh; 05-01-2024 at 09:27.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Server Discussion     Source Servers (SRCDS)     HL1 Servers (HLDS) AMX Mod X     News     Bug Reports     General     Off-Topic     Plugins         Suggestions / Requests         Approved Plugins         New Plugin Submissions         Unapproved/Old Plugins         Translation Request         High-Traffic Plugins             GunGame             UAIO (Ultimate All-In-One Plugin)             xREDIRECT             CSDM             AMX Super             RuneMod             Zombie Plague Mod             SuperHero Mod                 News                 Tech Support                 Scripting Help                 Off-Topic / General Chat                 Heroes                     Suggestions / Requests                     Approved Heroes                     New Submissions                     Unapproved/Old Heroes                         Module Heroes                     SuperHero Mod Stats - By 123                 (OLD) Bug Reports     Scripting         Scripting Help         Code Snippets/Tutorials         Module Coding     Donor Access SourceMod     News     General     Plugins         Plugins         Unapproved Plugins         Plugin/Gameplay Ideas and Requests         High-Traffic Plugins             SourceMod Anti-Cheat             Zombie:Reloaded             SourceBans / SourceBans++             VSH / Freak Fortress             Store             SM_Hosties             HLstatsX:CE     Scripting     Extensions     Snippets and Tutorials     Donor Access     Metamod: Source         Metamod:Source Plugins         Metamod:Source Questions         Coding MM:S Plugins & SM Extensions Hosted Stuff     Asherkin's Plugins         TFDodgeball         TF2Items         SteamTools     Bail's Plugins         CSDM         CS:S DM Off-Topic & Trash     Off-Topic     Trash

All times are GMT -4. The time now is 14:43.

 DMCA - Archive - Top