Raised This Month: $12 Target: $400
 3% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 12-04-2009 , 08:49   stun spell: how to block weapon change & mouse movement & more crap :P
Reply With Quote #1

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.
__________________

Last edited by ehha; 12-04-2009 at 08:51.
ehha is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-04-2009 , 11:08   Re: stun spell: how to block weapon change & mouse movement & more crap :P
Reply With Quote #2

dic ca esti din sibiu.. noroc ca am vazut id ca era sa te injur )
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 12-04-2009 , 17:05   Re: stun spell: how to block weapon change & mouse movement & more crap :P
Reply With Quote #3

Cu ce ocazie ai vrut sa ma injuri?
__________________
ehha is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 12-04-2009 , 17:22   Re: stun spell: how to block weapon change & mouse movement & more crap :P
Reply With Quote #4

nuj nici eu
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-04-2009 , 18:23   Re: stun spell: how to block weapon change & mouse movement & more crap :P
Reply With Quote #5

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)
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 12-05-2009 , 08:18   Re: stun spell: how to block weapon change & mouse movement & more crap :P
Reply With Quote #6

Wow! This blocks everything & works great. Thanks Connor.
__________________
ehha is offline
Reply


Thread Tools
Display Modes

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 14:37.


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