Raised This Month: $ Target: $400
 0% 

hook mode ADMIN FLAG E(by Bend3r and AsskickR)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 08-27-2005 , 08:25   hook mode ADMIN FLAG E(by Bend3r and AsskickR)
Reply With Quote #1

this plugin is taken out from AsskickR's kz plugin that allows admins only to hook and rope!

made by Bend3r...


Code:
#include <amxmodx> #include <amxmisc> #include <fun> #include <engine> /*Hook Stuff*/ #define TE_BEAMENTPOINT 1 #define TE_KILLBEAM 99 #define DELTA_T 0.1                // seconds #define BEAMLIFE 100            // deciseconds #define MOVEACCELERATION 150    // units per second^2 #define REELSPEED 500            // units per second /*Timer Stuff*/ new bool:gHasTimer[33] new gHookLocation[33][3] new gHookLenght[33] new bool:gIsHooked[33] new gAllowedHook[33] new Float:gBeamIsCreated[33] new global_gravity new beam /*****Admin Hook - Init*****/ public plugin_init() {     register_plugin("Admin Hook","1.0","AssKicR")     //ADMIN HOOK     register_clcmd("+rope", "hook_on",ADMIN_LEVEL_E)     register_clcmd("-rope", "hook_off",ADMIN_LEVEL_E)     register_clcmd("+hook", "hook_on",ADMIN_LEVEL_E)     register_clcmd("-hook", "hook_off",ADMIN_LEVEL_E) } /***Admin Hook - Precache Files***/ public plugin_precache() {     beam = precache_model("sprites/zbeam4.spr")     precache_sound("weapons/xbow_hit2.wav") } /***Admin Hook***/ stock kz_velocity_set(id,vel[3]) {     //Set Their Velocity to 0 so that they they fall straight down from     new Float:Ivel[3]     Ivel[0]=float(vel[0])     Ivel[1]=float(vel[1])     Ivel[2]=float(vel[2])     entity_set_vector(id, EV_VEC_velocity, Ivel) } stock kz_velocity_get(id,vel[3]) {     //Set Their Velocity to 0 so that they they fall straight down from     new Float:Ivel[3]     entity_get_vector(id, EV_VEC_velocity, Ivel)     vel[0]=floatround(Ivel[0])     vel[1]=floatround(Ivel[1])     vel[2]=floatround(Ivel[2]) } stock CheatDetect(id,cheat[]) {     if (gHasTimer[id]) {         client_print(id,print_chat,"[AMXX] %s Detected.. Timer Terminated",cheat)     } } public ropetask(parm[]) {     new id = parm[0]     new user_origin[3], user_look[3], user_direction[3], move_direction[3]     new A[3], D[3], buttonadjust[3]     new acceleration, velocity_towards_A, desired_velocity_towards_A     new velocity[3], null[3]     if (!is_user_alive(id))     {         RopeRelease(id)         return     }     if (gBeamIsCreated[id] + BEAMLIFE/10 <= get_gametime())     {         beamentpoint(id)     }     null[0] = 0     null[1] = 0     null[2] = 0     get_user_origin(id, user_origin)     get_user_origin(id, user_look,2)     kz_velocity_get(id, velocity)     buttonadjust[0]=0     buttonadjust[1]=0     if (get_user_button(id)&IN_FORWARD)        buttonadjust[0]+=1     if (get_user_button(id)&IN_BACK)        buttonadjust[0]-=1     if (get_user_button(id)&IN_MOVERIGHT)    buttonadjust[1]+=1     if (get_user_button(id)&IN_MOVELEFT)    buttonadjust[1]-=1     if (get_user_button(id)&IN_JUMP)        buttonadjust[2]+=1     if (get_user_button(id)&IN_DUCK)        buttonadjust[2]-=1     if (buttonadjust[0] || buttonadjust[1])     {         user_direction[0] = user_look[0] - user_origin[0]         user_direction[1] = user_look[1] - user_origin[1]         move_direction[0] = buttonadjust[0]*user_direction[0] + user_direction[1]*buttonadjust[1]         move_direction[1] = buttonadjust[0]*user_direction[1] - user_direction[0]*buttonadjust[1]         move_direction[2] = 0         velocity[0] += floatround(move_direction[0] * MOVEACCELERATION * DELTA_T / get_distance(null,move_direction))         velocity[1] += floatround(move_direction[1] * MOVEACCELERATION * DELTA_T / get_distance(null,move_direction))     }     if (buttonadjust[2])    gHookLenght[id] -= floatround(buttonadjust[2] * REELSPEED * DELTA_T)     if (gHookLenght[id] < 100) gHookLenght[id] = 100     A[0] = gHookLocation[id][0] - user_origin[0]     A[1] = gHookLocation[id][1] - user_origin[1]     A[2] = gHookLocation[id][2] - user_origin[2]     D[0] = A[0]*A[2] / get_distance(null,A)     D[1] = A[1]*A[2] / get_distance(null,A)     D[2] = -(A[1]*A[1] + A[0]*A[0]) / get_distance(null,A)     acceleration = - global_gravity * D[2] / get_distance(null,D)     velocity_towards_A = (velocity[0] * A[0] + velocity[1] * A[1] + velocity[2] * A[2]) / get_distance(null,A)     desired_velocity_towards_A = (get_distance(user_origin,gHookLocation[id]) - gHookLenght[id] /*- 10*/) * 4     if (get_distance(null,D)>10)     {         velocity[0] += floatround((acceleration * DELTA_T * D[0]) / get_distance(null,D))         velocity[1] += floatround((acceleration * DELTA_T * D[1]) / get_distance(null,D))         velocity[2] += floatround((acceleration * DELTA_T * D[2]) / get_distance(null,D))     }     velocity[0] += ((desired_velocity_towards_A - velocity_towards_A) * A[0]) / get_distance(null,A)     velocity[1] += ((desired_velocity_towards_A - velocity_towards_A) * A[1]) / get_distance(null,A)     velocity[2] += ((desired_velocity_towards_A - velocity_towards_A) * A[2]) / get_distance(null,A)     kz_velocity_set(id, velocity) } public hooktask(parm[]) {     new id = parm[0]     new velocity[3]     if ( !gIsHooked[id] ) return           new user_origin[3],oldvelocity[3]     parm[0] = id     if (!is_user_alive(id))     {         RopeRelease(id)         return     }     if (gBeamIsCreated[id] + BEAMLIFE/10 <= get_gametime())     {         beamentpoint(id)     }     get_user_origin(id, user_origin)     kz_velocity_get(id, oldvelocity)     new distance=get_distance( gHookLocation[id], user_origin )     if ( distance > 10 )     {         velocity[0] = floatround( (gHookLocation[id][0] - user_origin[0]) * ( 2.0 * REELSPEED / distance ) )         velocity[1] = floatround( (gHookLocation[id][1] - user_origin[1]) * ( 2.0 * REELSPEED / distance ) )         velocity[2] = floatround( (gHookLocation[id][2] - user_origin[2]) * ( 2.0 * REELSPEED / distance ) )     }     else     {         velocity[0]=0         velocity[1]=0         velocity[2]=0     }     kz_velocity_set(id, velocity)       } public hook_on(id) {     if (gAllowedHook[id] || (get_user_flags(id)&ADMIN_LEVEL_E)) {         if (!gIsHooked[id] && is_user_alive(id))         {             new cmd[32]             read_argv(0,cmd,31)             if(equal(cmd,"+rope")) RopeAttach(id,0)             if(equal(cmd,"+hook")) RopeAttach(id,1)         }     }else{         client_print(id,print_chat,"You have no access to that command")         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED } public hook_off(id) {     if (gAllowedHook[id] || (get_user_flags(id)&ADMIN_LEVEL_E)) {         if (gIsHooked[id])         {             RopeRelease(id)         }     }else{         client_print(id,print_chat,"You have no access to that command")         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED } public RopeAttach(id,hook) {     CheatDetect(id,"Hook/Rope")     new parm[1], user_origin[3]     parm[0] = id     gIsHooked[id] = true     get_user_origin(id,user_origin)     get_user_origin(id,gHookLocation[id], 3)     gHookLenght[id] = get_distance(gHookLocation[id],user_origin)     global_gravity = get_cvar_num("sv_gravity")     set_user_gravity(id,0.001)     beamentpoint(id)     emit_sound(id, CHAN_STATIC, "weapons/xbow_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     if (hook) set_task(DELTA_T, "hooktask", 200+id, parm, 1, "b")     else set_task(DELTA_T, "ropetask", 200+id, parm, 1, "b") } public RopeRelease(id) {     gIsHooked[id] = false     killbeam(id)     set_user_gravity(id)     remove_task(200+id) } public beamentpoint(id) {     message_begin( MSG_BROADCAST, SVC_TEMPENTITY )     write_byte( TE_BEAMENTPOINT )     write_short( id )     write_coord( gHookLocation[id][0] )     write_coord( gHookLocation[id][1] )     write_coord( gHookLocation[id][2] )     write_short( beam )    // sprite index     write_byte( 0 )        // start frame     write_byte( 0 )        // framerate     write_byte( BEAMLIFE )    // life     write_byte( 10 )    // width     write_byte( 0 )        // noise     if (get_user_team(id)==1)        // Terrorist     {         write_byte( 255 )    // r, g, b         write_byte( 0 )    // r, g, b         write_byte( 0 )    // r, g, b     }     else                            // Counter-Terrorist     {         write_byte( 0 )    // r, g, b         write_byte( 0 )    // r, g, b         write_byte( 255 )    // r, g, b     }     write_byte( 150 )    // brightness     write_byte( 0 )        // speed     message_end( )     gBeamIsCreated[id] = get_gametime() } public killbeam(id) {     message_begin( MSG_BROADCAST, SVC_TEMPENTITY )     write_byte( TE_KILLBEAM )     write_short( id )     message_end() }
Attached Files
File Type: amx admin_hook.amx (8.3 KB, 176 views)
__________________
atomic is offline
kILL-jOY
Member
Join Date: Jul 2005
Old 09-06-2005 , 22:47  
Reply With Quote #2

if i put this on a server without other kinds of hook plugins everyone would leave because just for an admin it would be WAY to cheap
__________________
**|$uperHero|** Free level 8 / 75+ Heroes / BuyXP at 68.191.146.3:27015 - CS 1.6


kILL-jOY is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-06-2005 , 23:59  
Reply With Quote #3

Ok for the second person today. Post the .sma not the .amxx
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Zie2K5
Member
Join Date: Jul 2005
Old 09-08-2005 , 09:43  
Reply With Quote #4

commands plz =/, im noob
Zie2K5 is offline
Send a message via MSN to Zie2K5
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 09-08-2005 , 15:23  
Reply With Quote #5

bind "f""+hook"
bind "v""+rope"
__________________
atomic is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 09-08-2005 , 17:40  
Reply With Quote #6

ok.. I guess you are allowed to rip code out of my plugins and release them since this is open source, but at least get my friggin name right

it is AssKicR

not AssKickeR, AssKickR, AssKiceR,how you wrote it AsskickR, or any other mindblowing way..

It is AssKicR

also where does this b3nder come in.. i just see my code

Aw fuck it.. i just made my own version correctly without the parts you left that is not supposed to be there and with the parts u left out

http://forums.alliedmods.net/showthread.php?p=151022
__________________
My Plugins

Got ??
AssKicR is offline
CubicVirtuoso
Senior Member
Join Date: Sep 2004
Location: Canada
Old 09-08-2005 , 19:43  
Reply With Quote #7

LOL truly a marvel of genuis AssKicRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRR
__________________
Sig Under Construction.
CubicVirtuoso is offline
Send a message via ICQ to CubicVirtuoso Send a message via AIM to CubicVirtuoso Send a message via MSN to CubicVirtuoso Send a message via Yahoo to CubicVirtuoso
Bend3R
Veteran Member
Join Date: Oct 2004
Location: Sweden (Stockholm)
Old 09-11-2005 , 17:16  
Reply With Quote #8

Quote:
Originally Posted by AssKicR

it is AssKicR

not AssKickeR, AssKickR, AssKiceR,how you wrote it AsskickR, or any other mindblowing way..

It is AssKicR
my name is Bend3R, ^Bend3R

not b3nder, bender,...
Bend3R is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 09-11-2005 , 19:24  
Reply With Quote #9

*sniff* yep, the smell of trash
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS 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 20:50.


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