1 |
/* |
/* |
2 |
Grab+ v1.1 |
Grab+ v1.2 |
3 |
Copyright (C) 2007 Ian (Juan) Cammarata |
Copyright (C) 2007 Ian (Juan) Cammarata |
4 |
|
|
5 |
This program is free software; you can redistribute it and/or modify it under |
This program is free software; you can redistribute it and/or modify it under |
16 |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
17 |
|
|
18 |
http://ian.cammarata.us/projects/grab_plus |
http://ian.cammarata.us/projects/grab_plus |
19 |
Oct 16 21:03 |
Nov 01 04:16 |
20 |
|
|
21 |
|
|
22 |
Description: |
Description: |
63 |
gp_choketime <1.5|...> Time frequency for choking. |
gp_choketime <1.5|...> Time frequency for choking. |
64 |
gp_chokedmg <5|...> Amount of damage done with each choke. |
gp_chokedmg <5|...> Amount of damage done with each choke. |
65 |
|
|
66 |
gp_glow_r <50|0-255> Sets red amount for glow. |
gp_screenfade <1|0> Enables/disables screenfade when grabbing. |
67 |
gp_glow_g <0|0-255> Sets green amount for glow. |
gp_glow <1|0> Enables/disables glowing for grabbed objects. |
68 |
gp_glow_b <0|0-255> Sets blue amount for glow. |
|
69 |
|
gp_glow_r <50|0-255> Sets red amount for glow and screenfade. |
70 |
|
gp_glow_g <0|0-255> Sets green amount for glow and screenfade. |
71 |
|
gp_glow_b <0|0-255> Sets blue amount for glow and screenfade. |
72 |
|
gp_glow_a <0|0-255> Sets alpha for glow and screenfade. |
73 |
|
|
74 |
|
|
75 |
Notes: |
Notes: |
123 |
#include <amxmisc> |
#include <amxmisc> |
124 |
#include <fakemeta> |
#include <fakemeta> |
125 |
|
|
126 |
#define VERSION "1.2b4" |
#define VERSION "1.2b5" |
127 |
#define ADMIN ADMIN_LEVEL_A |
#define ADMIN ADMIN_LEVEL_A |
128 |
|
|
129 |
#define TSK_CHKE 50 |
#define TSK_CHKE 50 |
221 |
pev( id, pev_view_ofs, ret ) |
pev( id, pev_view_ofs, ret ) |
222 |
|
|
223 |
for( new i = 0; i < 3; i++ ) orig[i] += ret[i] |
for( new i = 0; i < 3; i++ ) orig[i] += ret[i] |
224 |
engfunc( EngFunc_GetAimVector, id, 1, ret ) |
velocity_by_aim( id, 1, ret ) |
225 |
for( new i = 0; i < 3; i++ ) ret[i] = orig[i] + ( ret[i] * 9999 ) |
for( new i = 0; i < 3; i++ ) ret[i] = orig[i] + ( ret[i] * 9999 ) |
226 |
|
|
227 |
engfunc( EngFunc_TraceLine, orig, ret, 0, id, 0 ) |
engfunc( EngFunc_TraceLine, orig, ret, 0, id, 0 ) |
301 |
|
|
302 |
pev( id, pev_origin, dest ) |
pev( id, pev_origin, dest ) |
303 |
pev( id, pev_view_ofs, tmpvec ) |
pev( id, pev_view_ofs, tmpvec ) |
304 |
engfunc( EngFunc_GetAimVector, id, len, tmpvec2 ) |
velocity_by_aim( id, len, tmpvec2 ) |
305 |
torig = get_target_origin_f( target ) |
torig = get_target_origin_f( target ) |
306 |
|
|
307 |
new force = get_pcvar_num( p_grabforce ) |
new force = get_pcvar_num( p_grabforce ) |
373 |
if( target > 0 ) |
if( target > 0 ) |
374 |
{ |
{ |
375 |
new Float:pVelocity[3] |
new Float:pVelocity[3] |
376 |
engfunc( EngFunc_GetAimVector, id, get_pcvar_num( p_throwforce ), pVelocity ) |
velocity_by_aim( id, get_pcvar_num(p_throwforce), pVelocity ) |
377 |
set_pev( target, pev_velocity, pVelocity ) |
set_pev( target, pev_velocity, pVelocity ) |
378 |
unset_grabbed( id ) |
unset_grabbed( id ) |
379 |
return PLUGIN_HANDLED |
return PLUGIN_HANDLED |
572 |
pev( id, pev_origin, orig ) |
pev( id, pev_origin, orig ) |
573 |
pev( id, pev_view_ofs, tmpvec ) |
pev( id, pev_view_ofs, tmpvec ) |
574 |
for( i = 0; i < 3; i++ ) tmpvec[i] += orig[i] |
for( i = 0; i < 3; i++ ) tmpvec[i] += orig[i] |
575 |
engfunc( EngFunc_GetAimVector, id, get_pcvar_num( p_mindist ), tmpvec2 ) |
velocity_by_aim( id, get_pcvar_num( p_mindist ), tmpvec2 ) |
576 |
|
|
577 |
for( new j = 1; j < 11 && !safe; j++ ) |
for( new j = 1; j < 11 && !safe; j++ ) |
578 |
{ |
{ |