Raised This Month: $32 Target: $400
 8% 

[REQ] Shockwave (push other players)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Joce93
Senior Member
Join Date: Feb 2016
Old 06-28-2016 , 19:35   [REQ] Shockwave (push other players)
Reply With Quote #1

Hello guys

I need a plugin who allows me to push the other players (by doing a shockwave in a radius). Just as admin pls.

This is what I want:

https://www.youtube.com/watch?v=q1byP3ewPog#t=0m12s

However, maybe a little less powerful. Editing the shockwave sound would be nice too.

Thanks
Joce93 is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 07-15-2016 , 13:15   Re: [REQ] Shockwave (push other players)
Reply With Quote #2

Anyone ?
Joce93 is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 07-27-2016 , 13:47   Re: [REQ] Shockwave (push other players)
Reply With Quote #3

Please
Joce93 is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 07-27-2016 , 14:02   Re: [REQ] Shockwave (push other players)
Reply With Quote #4

The only thing I mostly see is just this:

__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 07-28-2016 , 11:21   Re: [REQ] Shockwave (push other players)
Reply With Quote #5

Hmm strange me too, i could see it days ago, well.

I need something that allow me to push other players by doing a "shockwave" in a radius as I said in the first post.

Can someone make it ?
Joce93 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-28-2016 , 12:55   Re: [REQ] Shockwave (push other players)
Reply With Quote #6

The most basic approach:
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <xs>

public plugin_init()
{
    
register_clcmd("shockwave""ClientCommand_ShockWave")
}

public 
ClientCommand_ShockWave(id)
{
    new 
PlayersInRadius[33], PlayersNumindex
    PlayersNum 
find_sphere_class(id"player"250.0PlayersInRadiussizeof PlayersInRadius)
    
    new 
Float:velocity[3]
    for(new 
iPlayersNumi++)
    {
        
index PlayersInRadius[i]
        if(
id == index)
        {
            continue
        }
    
        
velocity_by_aim(index999velocity)
        
xs_vec_neg(velocityvelocity)
        
        
set_pev(indexpev_velocityvelocity)
    }

Radius is 250.0, power is 999. Alter them as you like.
__________________
HamletEagle is offline
Joce93
Senior Member
Join Date: Feb 2016
Old 07-28-2016 , 16:14   Re: [REQ] Shockwave (push other players)
Reply With Quote #7

Thanks, works fine.
Joce93 is offline
Haunted Dino
Junior Member
Join Date: May 2019
Old 06-06-2019 , 07:34   Re: [REQ] Shockwave (push other players)
Reply With Quote #8

whats the command for this shockwave?
Haunted Dino is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-06-2019 , 08:39   Re: [REQ] Shockwave (push other players)
Reply With Quote #9

Quote:
Originally Posted by Haunted Dino View Post
whats the command for this shockwave?
shockwave on console
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-06-2019 , 14:31   Re: [REQ] Shockwave (push other players)
Reply With Quote #10

Try that:

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <xs>

#define PLUGIN                     "Unknown yet"
#define VERSION                 "1.0"
#define AUTHOR                     "EFFEX"

#define IMMUNITY_FLAG                    ADMIN_IMMUNITY


#define calculateRadiusDamage(%1,%2)        floatclamp((%1 - (%2 * %1 / g_fPushRadius)), 0.0, %1)
#define fixedUnsigned16(%1,%2)             clamp(floatround(%1 * %2), 0, 0xFFFF)
#define message_begin_fl(%1,%2,%3,%4)        engfunc(EngFunc_MessageBegin, %1, %2, %3, %4)
#define write_coord_fl(%1)                engfunc(EngFunc_WriteCoord, %1)

new g_iExplosionSprite
new g_mMessageScreenShake

new const g_szExplosionSound[] =            "weapons/explode3.wav"

const Float:g_fPushRadius =                250.0
const Float:g_fImpulseMultiplier =             4.5
const Float:g_fMaxDamage =            10.0

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_mMessageScreenShake get_user_msgid("ScreenShake")
    
    
register_clcmd("shockwave""pushPlayers")
}

public 
plugin_precache()
{
    
precache_sound(g_szExplosionSound)
    
g_iExplosionSprite =     precache_model("sprites/shockwave.spr")
}

public 
pushPlayers(id)
{
    static 
Float:fEntityVelocity[3], Float:fVictimOrigin[3], Float:fTemp[3]
    static 
Float:fPusherOrigin[3]
    
pev(idpev_originfPusherOrigin)
    
    
message_begin_fl(MSG_PVSSVC_TEMPENTITYfPusherOrigin0)
    
write_byte(TE_BEAMCYLINDER)
    
write_coord_fl(fPusherOrigin[0])
    
write_coord_fl(fPusherOrigin[1])
    
write_coord_fl(fPusherOrigin[2])
    
write_coord_fl(fPusherOrigin[0])
    
write_coord_fl(fPusherOrigin[1])
    
write_coord_fl(fPusherOrigin[2] + g_fPushRadius)
    
write_short(g_iExplosionSprite)
    
write_byte(0)
    
write_byte(3)
    
write_byte(10)
    
write_byte(80)
    
write_byte(0)
    
write_byte(255)
    
write_byte(255)
    
write_byte(255)
    
write_byte(200)
    
write_byte(0)
    
message_end()
    
    
emit_sound(idCHAN_ITEMg_szExplosionSoundVOL_NORMATTN_NORM0PITCH_NORM)
    
    new 
iVictim = -1
    
while((iVictim engfunc(EngFunc_FindEntityInSphereiVictimfPusherOriging_fPushRadius)) != 0)
    {
        if(
is_user_alive(iVictim) && (iVictim != id) && ~get_user_flags(iVictim) & IMMUNITY_FLAG)
        {
            
message_begin(MSG_ONEg_mMessageScreenShake, .player iVictim)
            
write_short(fixedUnsigned16(20.0, (<< 12)))
            
write_short(fixedUnsigned16(3.0, (<< 12)))
            
write_short(fixedUnsigned16(5.7, (<< 8)))
            
message_end()
    
            
ExecuteHamB(Ham_TakeDamageididiVictimcalculateRadiusDamage(g_fMaxDamageget_distance_f(fPusherOriginfVictimOrigin)), DMG_BLAST)
            
            
pev(iVictimpev_velocityfEntityVelocity)
            
pev(iVictimpev_originfVictimOrigin)
            
            
xs_vec_sub(fVictimOriginfPusherOriginfTemp)
            
xs_vec_normalize(fTempfTemp)
            
xs_vec_mul_scalar(fTempg_fPushRadiusfTemp)
            
xs_vec_mul_scalar(fTempg_fImpulseMultiplierfTemp)
            
xs_vec_add(fEntityVelocityfTempfEntityVelocity)
            
set_pev(iVictimpev_velocityfEntityVelocity)
        }
    }

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 06-07-2019 at 09:43.
EFFx is offline
Reply



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 Jump


All times are GMT -4. The time now is 01:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode