AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   stun spell: how to block weapon change & mouse movement & more crap :P (https://forums.alliedmods.net/showthread.php?t=110894)

ehha 12-04-2009 08:49

stun spell: how to block weapon change & mouse movement & more crap :P
 
I wanna make a stun spell for a mod I'm working on. I only know how to block player movement & attacks.

So... the title & how to make a projectile moving from attacker to victim (both players) at X speed & calling function Y (this will do all the blocking stuff) on victim impact.
I think I can acquire the victim's id by looking at other plugins, so we can presume that this part is solved.

tuty 12-04-2009 11:08

Re: stun spell: how to block weapon change & mouse movement & more crap :P
 
dic ca esti din sibiu.. noroc ca am vazut id ca era sa te injur :))

ehha 12-04-2009 17:05

Re: stun spell: how to block weapon change & mouse movement & more crap :P
 
Cu ce ocazie ai vrut sa ma injuri? :D

tuty 12-04-2009 17:22

Re: stun spell: how to block weapon change & mouse movement & more crap :P
 
nuj nici eu

ConnorMcLeod 12-04-2009 18:23

Re: stun spell: how to block weapon change & mouse movement & more crap :P
 
PHP Code:

#include <amxmodx>
#include <engine>
#include <fakemeta>

#define MAX_PLAYERS    32

enum _:Coords {xyz}

new 
bool:g_bFrozen[MAX_PLAYERS+1]
new 
Float:g_fVecAngles[MAX_PLAYERS+1][Coords]

Freeze_Playeridbool:bFreeze )
{
    if( 
bFreeze && !g_bFrozen[id] )
    {
        
g_bFrozen[id] = true
        set_pev
(idpev_flagspev(idpev_flags) | FL_FROZEN )
        
pev(idpev_v_angleg_fVecAngles[id])
    }
    else if( !
bFreeze && g_bFrozen[id] )
    {
        
g_bFrozen[id] = false
        set_pev
(idpev_flagspev(idpev_flags) & ~FL_FROZEN )
    }
}

public 
client_PreThink(id)
{
    if( 
g_bFrozen[id] )
    {
        
set_pev(idpev_anglesg_fVecAngles[id])
        
set_pev(idpev_fixangle1)
    }



ehha 12-05-2009 08:18

Re: stun spell: how to block weapon change & mouse movement & more crap :P
 
Wow! This blocks everything & works great. Thanks Connor.


All times are GMT -4. The time now is 22:38.

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