AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HookMod X (https://forums.alliedmods.net/showthread.php?t=767)

ts2do 04-01-2004 19:44

HookMod X
 
Im making a hookmod that works with bots (based off the hook grab for amxmod) and it works fine sept for 1 teeny problem>>>the hooks dont show always and if they do they hook to odd origins??? why?? Im using te_beaments and defining both entities and updating entity 2 to be at the user aiming point or if hooked to an entity oldorigin-neworigin+targetorigin
Code:
#define STS_CHNL    6 #define STS_FLAG11 11 //Bomb planting #define STS_FLAG12 12 //Bomb defusing #include<amxmodx> #include<fun> #include<xtrafun> #include<Vexd_Utilities> #define TE_BEAMENTS 8 #define TE_KILLBEAM 99 #define BEAMLIFE 100 #define DELTA_T 0.1 new Float:beamcreated[33] new look2[33][3] new grabbed[33] new hooxtarget[33] new oldtargorigin[33][3] new targethit[33] new oldentorigin[33][3] new beam /* cvars -> local variables that will be synced in a timer */ new sv_hooksound,sv_hook,sv_hook_notify_when_active //new sv_hookwidth //new sv_hooknoise,sv_hookcolor,sv_hookbrightness,sv_hookspeed new sv_hookforce //new sv_hook_beamlife new Float:sv_hook_syncspeed public hookgrab(id) {    if (!(get_cvar_float("mp_freezetime"))&&(get_gametime()<=get_cvar_float("mp_freezetime")))       return 1    new cvar = sv_hook    if (cvar == 1)    {       if(!is_user_alive(id))          return 1       set_user_gravity(id,0.1)       set_user_maxspeed(id,0.1)       new lookx[3]       get_user_origin(id,lookx,3)       set_entity_origin(hooxtarget[id],lookx)       set_hookgrabbed(id)    }    return 1 } public report(id)     server_cmd("say %d",id) public notify_hook_status(svIndex[]) {     if(sv_hook_notify_when_active == 1 && sv_hook ==1)     {         client_print(0,print_chat,"[AMX] HookGrab mod is active!  say /hook for more info.")     }     new sId[32]     sId[0] = 0     set_task(380.0,"notify_hook_status",0,sId,31)     return 0 } public sync_cvars(sId[]) {  /* optimization: sync cvars in a timer to avoid stressful cvar lookups. */    /* if you add cvars, please follow this method to maintain speed */    /* floats */    sv_hook_syncspeed=get_cvar_float("sv_hook_syncspeed")+0.1    /* non floats */    sv_hooksound=get_cvar_num("sv_hooksound")    sv_hook=get_cvar_num("sv_hook")    sv_hook_notify_when_active=get_cvar_num("sv_hook_notify_when_active")    //sv_hookwidth=get_cvar_num("sv_hookwidth")    //sv_hooknoise=get_cvar_num("sv_hooknoise")    //sv_hookcolor=get_cvar_num("sv_hookcolor")    //sv_hookbrightness=get_cvar_num("sv_hookbrightness") //   sv_hookspeed=get_cvar_num("sv_hookspeed") //   sv_hook_beamlife=get_cvar_num("sv_hook_beamlife")    //sv_hook_allow_admin=get_cvar_num("sv_hook_allow_admin")    sv_hookforce=get_cvar_num("sv_hookforce")    set_task(sv_hook_syncspeed-0.1,"sync_cvars",0,sId[0],31)    return 0 } public set_hookgrabbed(id) {    get_entity_origin(hooxtarget[id],oldentorigin[id])    if(sv_hook == 0)       return 0    new origin1[3]    get_user_origin(id, origin1)    new soundcvar = sv_hooksound    if (soundcvar == 1)    {       emit_sound(id, CHAN_STATIC, "weapons/xbow_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    }    new body,hooktarget    get_user_aiming(id,hooktarget,body)    if(hooktarget){       targethit[id] = hooktarget       get_entity_origin(hooktarget,oldtargorigin[id])    }    grabbed[id] = id    set_beam(id)    new parm[2]    parm[0] = id    set_task(DELTA_T, "hookgrabtask", 101+id, parm, 1, "b")    return 0 } public set_beam(id)//,type) {     if(is_user_bot(id)){         message_begin(MSG_ONE, 98, {0,0,0},id)//ScreenFade =98         write_short(1<<12)         write_short(1<<1)         write_short(1<<2)         write_byte(0)         write_byte(0)         write_byte(0)         write_byte(255)         message_end()     }     //new color = sv_hookcolor     message_begin( MSG_BROADCAST,SVC_TEMPENTITY,{0,0,0} )     write_byte ( TE_BEAMENTS )       write_short ( hooxtarget[id] )     // ent     write_short( id )     write_short( beam )     write_byte( 1 ) // framestart     write_byte( 1 ) // framerate     write_byte( 0 ) // life     write_byte( 50 ) // width     write_byte( 32 ) // noise     write_byte( 255 ) //     write_byte( 255 ) // r, g, b     write_byte( 255 ) //     write_byte( 255 ) // brightness     write_byte( 100 ) // speed     message_end()     new aimvec[3]     get_entity_origin(hooxtarget[id],aimvec)     message_begin( MSG_PVS, SVC_TEMPENTITY)     write_byte( 9 )     write_coord( aimvec[0] )     write_coord( aimvec[1] )     write_coord( aimvec[2] )     message_end()         beamcreated[id] = get_gametime()         return 0 } public hookgrabtask(parm[]) {    new id = parm[0]    if(grabbed[id])    {       new origin[3], moveto[3], velocity[3], length       if (!is_user_alive(grabbed[id]))       {          unhook(id)          return 0       }       get_entity_origin(hooxtarget[id],look2[id])       get_user_origin(id, origin)//, 1)       new speed = sv_hookforce       length = get_distance(look2[id],origin)       if(length==0)          return 0       for(new p = 0;p<3;p++){          moveto[p]=origin[p]+(look2[id][p]-origin[p])*speed/length          velocity[p]=(moveto[p]-origin[p])       }       set_user_velocity(id, velocity)       if(targethit[id]){          new diff[3],targetorigin[3]          get_entity_origin(targethit[id],targetorigin)          for(new l = 0; l < 3; l++){             diff[l] = targetorigin[l] - oldtargorigin[id][l] + oldentorigin[id][l]             oldtargorigin[id][l] = targetorigin[l]             oldentorigin[id][l]=diff[l]          }          set_entity_origin(hooxtarget[id],diff)       }    }    return 0 } public playerhit_sound(id) {    new soundcvar2 = sv_hooksound    if (soundcvar2 == 1)    {       emit_sound(id, CHAN_STATIC, "common/bodydrop4.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)    }    return 0 } public unhook(id) {    if(grabbed[id]){       killbeam(id)       targethit[id]=0       grabbed[id]=false }    if(task_exists(101+id))       remove_task(101+id)    set_user_gravity(id,1.0)    set_user_maxspeed(id,280.0)    return 1 } public killbeam(id) {    message_begin( MSG_BROADCAST, SVC_TEMPENTITY )    write_byte( TE_KILLBEAM )    write_short( hooxtarget[id] )    message_end()    return 0 } public new_round(id) {    if (grabbed[id])    {       unhook(id)    }    return 0 } public plugin_precache() {    beam=precache_model("sprites/rope.spr")    precache_sound("weapons/xbow_hit1.wav")    precache_sound("common/bodydrop4.wav")    return 0 } public help_motd(id) {    new hook_motd[1300]    new text[768]    text = "There are two different types of hooks, one lets you \       swing (+hook), and the other will pull you directly towards the \       location you hooked onto. \       To bind the keys follow these directions: "    add(hook_motd,1299,text)    text = "- First open your console with the tilde ` key \       - Choose the keys that you want to use for the hooks \       - Type in bind ^"The key you chose^" ^"+hook^" \       - Press enter to complete the bind, It should look like this \       examples: bind ^"f^" ^"+hook^" "    add(hook_motd,1299,text)    text = "It takes some time to get used to the speed, momentum and \       swing. After a few minutes you should start getting the \       hang of it. \       Have Fun!!"    add(hook_motd,1299,text)    show_motd(id,hook_motd,"Hook Help:")    return 0 } public bot_interface(){     new sid[8],id2,clip,ammo     read_argv(1,sid,7)     id2 = str_to_num(sid)         new gunid         gunid = get_user_weapon(id2,clip,ammo)     new teamname[3]     get_user_team(id2,teamname,2)     new teambool = containi(teamname,"CT")     if((grabbed[id2]!=id2)||(gunid!=CSW_C4)||((get_user_flags(0,STS_CHNL)&(1<<STS_FLAG12))&&(teambool==1))||((get_user_flags(0,STS_CHNL)&(1<<STS_FLAG11))&&(teambool==0))||(!(get_cvar_float("mp_freezetime"))&&(get_gametime()<=get_cvar_float("mp_freezetime")))){         unhook(id2)         hookgrab(id2)         new parm[2]         parm[0]=id2         set_task(2.0,"unhookbot",0,parm,1)     } } public unhookbot(parm[]){         new id=parm[0]     server_cmd("botunhook %i",id) } public bot_unhook(){     new sid[8],id2     read_argv(1,sid,7)     id2 = str_to_num(sid)     unhook(id2) } public plugin_init() {    register_plugin("Hook Grab w/ Bot Support","0.9.8","{W`C}Bludy|GeekGod|Ivn-Software|ts2do")    register_cvar("sv_hook","1")    register_cvar("sv_hook_beamlife","0.0") /* around 11 seconds by default. 0 disables. */    register_cvar("sv_hook_notify_when_active","1")    register_cvar("sv_hook_allow_admin","1")    register_cvar("sv_hook_syncspeed","5.0") /* speed at which the sync routing will be called */    register_cvar("sv_hookforce","600")    //register_cvar("sv_hookwidth","5")    //register_cvar("sv_hooknoise","32")    //register_cvar("sv_hookcolor","0")    //register_cvar("sv_hookbrightness","100")    register_cvar("amx_autohook_bots_freq","3.0")    register_cvar("sv_hookspeed","1") /* speed of hook being deployed. */    register_cvar("sv_hookmsgs","0")    register_cvar("sv_hooksound","1")    register_clcmd("+hook","hookgrab")    register_clcmd("-hook","unhook")    register_srvcmd("bothook","bot_interface")    register_srvcmd("botunhook","bot_unhook")    register_clcmd("say /hook","help_motd")    register_clcmd("say hook","help_motd")    register_event("ResetHUD", "new_round", "b")    new sId[32]    sId[0] = 0    set_task(380.0,"notify_hook_status",0,sId,31)    sync_cvars(sId[0]) /* sync cvars now! */    set_task(5.0,"pluginstart") } public pluginstart(){     set_task(get_cvar_float("amx_autohook_bots_freq"),"chk_hook")     return 0    } round_start(){     remove_task(34028)     set_task(get_cvar_float("amx_autohook_bots_freq"),"chk_hook") } public client_putinserver(id){    hooxtarget[id] = CreateEntity("info_target")    DispatchSpawn(hooxtarget[id]) } public chk_hook(){     new players[32],inum     new maxpl = get_maxplayers()     for(new a = 1; a < maxpl; a++) {         if(is_user_connected(a)){             if(is_user_bot(a)){                 if(is_user_alive(a)){                     players[inum] = a                     inum++                 }             }         }     }     new guy = random_num(0,inum-1)     if(!players[guy])         return 0     server_cmd("bothook %i",players[guy])     set_task(get_cvar_float("amx_autohook_bots_freq"),"chk_hook")     return 0 } public plugin_log(){     new args = read_logargc()     if(!(args == 2))         return 0     new msg[32]     read_logargv(1,msg,31)     if(msg[6] == 'S')         round_start()     return 0 }

DoubleTap 04-01-2004 19:54

Should it be called HookModX, that implies it's for MMX and not AMXX as HookMod is a MM plugin... it would be great to have an update as long as all the variables folks (like me) ar currently using. If you making a new rope or Hook interface the name may seem misleading... This would be nice if code is optimised for HookMod...

Vic/DT

ts2do 04-01-2004 21:39

actually no its not x I was just keeping it there for a version or such **** thatll be replaced later :P
but I still need help makin the hoox show...pretty much all that is originally from Amx Hook Grab is the velocity formulas

DoubleTap 04-01-2004 21:42

Ok man, just trying to be sure if I am looking at a HookMod interface or a Ninjarope type mod that isn't HookMod but acts similar (but not similar)... Ninja Rope has been ported...

http://forums.alliedmods.net/showthread.php?t=601

If it isn't an interface for hookmod to enable hookmod changes thru AMX it is another version of Ninja Rope or a new HookModX ?

Vic/DT

ts2do 04-01-2004 22:11

its pretty much exactly like hookmod sept that bots can use it and I might make a few cvar additions later (a lot more likely)

ts2do 04-02-2004 22:57

this here is what we call a bump
Quote:

bump [ bump ]

verb (past bumped, past participle bumped, present participle bump·ing, 3rd person present singular bumps)

1. transitive and intransitive verb knock: to hit or knock something


2. transitive and intransitive verb move unsteadily: to move in a jolting or bouncing way
We bumped along the dirt track.


3. transitive verb turn away a passenger: to turn away an airline passenger with a reserved seat because the flight has been overbooked ( informal )

ts2do 04-05-2004 21:43

revised::: but Im still having trouble at the hilighted part....
the error Im gettin is like PM getting NaN velocity on 1 or 0.....ne1 can explain why it doesnt like my numbers
Code:
#define STS_CHNL    6 #define STS_FLAG11 11 //Bomb planting #define STS_FLAG12 12 //Bomb defusing #include<amxmodx> #include<fun> #include<engine> #define TE_BEAMENTS 8 #define TE_KILLBEAM 99 #define BEAMLIFE 100 #define DELTA_T 0.1 new Float:beamcreated[33] new grabbed[33] new hooxtarget[33] new oldtargorigin[33][3] new targethit[33] new oldentorigin[33][3] new beam /* cvars -> local variables that will be synced in a timer */ new sv_hooksound,sv_hook,sv_hook_notify_when_active //new sv_hookwidth //new sv_hooknoise,sv_hookcolor,sv_hookbrightness,sv_hookspeed new sv_hookforce //new sv_hook_beamlife new Float:sv_hook_syncspeed public hookgrab(id) {    if (!(get_cvar_float("mp_freezetime"))&&(get_gametime()<=get_cvar_float("mp_freezetime")))       return 1    new cvar = sv_hook    if (cvar == 1)    {       if(!is_user_alive(id))          return 1       set_user_gravity(id,0.1)       set_user_maxspeed(id,0.1)       new lookx[3]       get_user_origin(id,lookx,3)       entity_set_vector(hooxtarget[id],EV_VEC_origin,Float:lookx)       set_hookgrabbed(id)    }    return 1 } public report(id)     server_cmd("say %d",id) public notify_hook_status(svIndex[]) {     if(sv_hook_notify_when_active == 1 && sv_hook ==1)     {         client_print(0,print_chat,"[AMX] HookGrab mod is active!  say /hook for more info.")     }     new sId[32]     sId[0] = 0     set_task(380.0,"notify_hook_status",0,sId,31)     return 0 } public sync_cvars(sId[]) {  /* optimization: sync cvars in a timer to avoid stressful cvar lookups. */    /* if you add cvars, please follow this method to maintain speed */    /* floats */    sv_hook_syncspeed=get_cvar_float("sv_hook_syncspeed")+0.1    /* non floats */    sv_hooksound=get_cvar_num("sv_hooksound")    sv_hook=get_cvar_num("sv_hook")    sv_hook_notify_when_active=get_cvar_num("sv_hook_notify_when_active")    //sv_hookwidth=get_cvar_num("sv_hookwidth")    //sv_hooknoise=get_cvar_num("sv_hooknoise")    //sv_hookcolor=get_cvar_num("sv_hookcolor")    //sv_hookbrightness=get_cvar_num("sv_hookbrightness") //   sv_hookspeed=get_cvar_num("sv_hookspeed") //   sv_hook_beamlife=get_cvar_num("sv_hook_beamlife")    //sv_hook_allow_admin=get_cvar_num("sv_hook_allow_admin")    sv_hookforce=get_cvar_num("sv_hookforce")    set_task(sv_hook_syncspeed-0.1,"sync_cvars",0,sId[0],31)    return 0 } public set_hookgrabbed(id) {    new Float:origin[3]    entity_get_vector(hooxtarget[id],EV_VEC_origin,origin)    FVecIVec(origin,oldentorigin[id])    if(sv_hook == 0)       return 0    new origin1[3]    get_user_origin(id, origin1)    new soundcvar = sv_hooksound    if (soundcvar == 1)    {       emit_sound(id, CHAN_STATIC, "weapons/xbow_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)    }    new body,hooktarget    get_user_aiming(id,hooktarget,body)    if(hooktarget){       targethit[id] = hooktarget       entity_get_vector(hooktarget,EV_VEC_origin,origin)       FVecIVec(origin,oldtargorigin[id])    }    grabbed[id] = id    set_beam(id)    new parm[2]    parm[0] = id    set_task(DELTA_T, "hookgrabtask", 101+id, parm, 1, "b")    return 0 } public set_beam(id)//,type) {     if(is_user_bot(id)){         message_begin(MSG_ONE, 98, {0,0,0},id)//ScreenFade =98         write_short( 1<<15 )         write_short( 1<<10 )         write_short( 1<<12 )         write_byte( 255 )         write_byte( 255 )         write_byte( 255 )         write_byte( 255 )         message_end()     }     //new color = sv_hookcolor     message_begin( MSG_BROADCAST,SVC_TEMPENTITY,{0,0,0} )     write_byte ( TE_BEAMENTS )       write_short ( hooxtarget[id] )     // ent     write_short( id )     write_short( beam )     write_byte( 1 ) // framestart     write_byte( 1 ) // framerate     write_byte( 0 ) // life     write_byte( 50 ) // width     write_byte( 32 ) // noise     write_byte( 255 ) //     write_byte( 255 ) // r, g, b     write_byte( 255 ) //     write_byte( 255 ) // brightness     write_byte( 100 ) // speed     message_end()     new aimvec[3],Float:origin[3]         entity_get_vector(hooxtarget[id],EV_VEC_origin,origin)     FVecIVec(origin,aimvec)     message_begin( MSG_PVS, SVC_TEMPENTITY)     write_byte( 9 )     write_coord( aimvec[0] )     write_coord( aimvec[1] )     write_coord( aimvec[2] )     message_end()         beamcreated[id] = get_gametime()         return 0 }
public hookgrabtask(parm[])
{
new id = parm[0]
if(grabbed[id])
{
new origin[3], moveto[3], velocity[3], length
if (!is_user_alive(grabbed[id]))
{
unhook(id)
return 0
}
new Float:forigin[3]
entity_get_vector(hooxtarget[id],EV_VEC_origin,forigin)
get_user_origin(id, origin)//, 1)
new speed = sv_hookforce
new dist1[3]
for(new p=0;p<3;p++){
dist1[p] = floatround(forigin[p])
}
length = get_distance(dist1,origin)
if(length<=20)
return 0
for(new p = 0;p<3;p++){
moveto[p]=origin[p]+(floatround(forigin[p])-origin[p])*speed/length
velocity[p]=(moveto[p]-origin[p])
}
entity_set_vector(id, EV_VEC_velocity, Float:velocity)
if(targethit[id]){
new diff[3]
entity_get_vector(targethit[id],EV_VEC_origin,forigin)
for(new l = 0; l < 3; l++){
diff[l] = floatround(forigin[l]) - oldtargorigin[id][l] + oldentorigin[id][l]
oldtargorigin[id][l] = floatround(forigin[l])
oldentorigin[id][l]=diff[l]
}
entity_set_vector(hooxtarget[id],EV_VEC_origin,Float:diff)
}
}
return 0
}

Code:
public playerhit_sound(id) {    new soundcvar2 = sv_hooksound    if (soundcvar2 == 1)    {       emit_sound(id, CHAN_STATIC, "common/bodydrop4.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)    }    return 0 } public unhook(id) {    if(grabbed[id]){       killbeam(id)       targethit[id]=0       grabbed[id]=false }    if(task_exists(101+id))       remove_task(101+id)    set_user_gravity(id,1.0)    set_user_maxspeed(id,280.0)    return 1 } public killbeam(id) {    message_begin( MSG_BROADCAST, SVC_TEMPENTITY )    write_byte( TE_KILLBEAM )    write_short( hooxtarget[id] )    message_end()    return 0 } public new_round(id) {    if (grabbed[id])    {       unhook(id)    }    return 0 } public plugin_precache() {    beam=precache_model("sprites/rope.spr")    precache_sound("weapons/xbow_hit1.wav")    precache_sound("common/bodydrop4.wav")    return 0 } public help_motd(id) {    new hook_motd[1300]    new text[768]    text = "There are two different types of hooks, one lets you \       swing (+hook), and the other will pull you directly towards the \       location you hooked onto. \       To bind the keys follow these directions: "    add(hook_motd,1299,text)    text = "- First open your console with the tilde ` key \       - Choose the keys that you want to use for the hooks \       - Type in bind ^"The key you chose^" ^"+hook^" \       - Press enter to complete the bind, It should look like this \       examples: bind ^"f^" ^"+hook^" "    add(hook_motd,1299,text)    text = "It takes some time to get used to the speed, momentum and \       swing. After a few minutes you should start getting the \       hang of it. \       Have Fun!!"    add(hook_motd,1299,text)    show_motd(id,hook_motd,"Hook Help:")    return 0 } public bot_interface(){     new sid[8],id2,clip,ammo     read_argv(1,sid,7)     id2 = str_to_num(sid)         new gunid         gunid = get_user_weapon(id2,clip,ammo)     new teamname[3]     get_user_team(id2,teamname,2)     new teambool = containi(teamname,"CT")     if((grabbed[id2]!=id2)||(gunid!=CSW_C4)||((get_user_flags(0,STS_CHNL)&(1<<STS_FLAG12))&&(teambool==1))||(( get_user_flags(0,STS_CHNL)&(1<<STS_FLAG11))&&(teambool==0))||(!(get_cvar_float("mp_freezetime"))&&(get_gametime()<= get_cvar_float("mp_freezetime")))){         unhook(id2)         hookgrab(id2)         new parm[2]         parm[0]=id2         set_task(2.0,"unhookbot",0,parm,1)     } } public unhookbot(parm[]){         new id=parm[0]     server_cmd("botunhook %i",id) } public bot_unhook(){     new sid[8],id2     read_argv(1,sid,7)     id2 = str_to_num(sid)     unhook(id2) } public plugin_init() {    register_plugin("Hook Grab w/ Bot Support","0.9.8","{W`C}Bludy|GeekGod|Ivn-Software|ts2do")    register_cvar("sv_hook","1")    register_cvar("sv_hook_beamlife","0.0") /* around 11 seconds by default. 0 disables. */    register_cvar("sv_hook_notify_when_active","1")    register_cvar("sv_hook_allow_admin","1")    register_cvar("sv_hook_syncspeed","5.0") /* speed at which the sync routing will be called */    register_cvar("sv_hookforce","600")    //register_cvar("sv_hookwidth","5")    //register_cvar("sv_hooknoise","32")    //register_cvar("sv_hookcolor","0")    //register_cvar("sv_hookbrightness","100")    register_cvar("amx_autohook_bots_freq","3.0")    register_cvar("sv_hookspeed","1") /* speed of hook being deployed. */    register_cvar("sv_hookmsgs","0")    register_cvar("sv_hooksound","1")    register_clcmd("+hook","hookgrab")    register_clcmd("-hook","unhook")    register_srvcmd("bothook","bot_interface")    register_srvcmd("botunhook","bot_unhook")    register_clcmd("say /hook","help_motd")    register_clcmd("say hook","help_motd")    register_event("ResetHUD", "new_round", "b")    new sId[32]    sId[0] = 0    set_task(380.0,"notify_hook_status",0,sId,31)    sync_cvars(sId[0]) /* sync cvars now! */    set_task(5.0,"pluginstart") } public pluginstart(){     set_task(get_cvar_float("amx_autohook_bots_freq"),"chk_hook")     return 0    } round_start(){     remove_task(34028)     set_task(get_cvar_float("amx_autohook_bots_freq"),"chk_hook") } public client_putinserver(id){    hooxtarget[id] = create_entity("info_target")    DispatchSpawn(hooxtarget[id]) } public chk_hook(){     new players[32],inum     new maxpl = get_maxplayers()     for(new a = 1; a < maxpl; a++) {         if(is_user_connected(a)){             if(is_user_bot(a)){                 if(is_user_alive(a)){                     players[inum] = a                     inum++                 }             }         }     }     new guy = random_num(0,inum-1)     if(!players[guy])         return 0     server_cmd("bothook %i",players[guy])     set_task(get_cvar_float("amx_autohook_bots_freq"),"chk_hook")     return 0 } public plugin_log(){     new args = read_logargc()     if(!(args == 2))         return 0     new msg[32]     read_logargv(1,msg,31)     if(msg[6] == 'S')         round_start()     return 0 }

ThorW634 04-05-2004 23:42

wow.

ts2do 04-07-2004 08:56

^bump

ts2do 04-08-2004 11:51

*****bump

ts2do 04-13-2004 17:45

buuuuuuuuuump

ts2do 04-15-2004 11:57

Quote:

Originally Posted by ts2do
buuuuuuuuuump


ts2do 04-16-2004 10:01

buuuuuuuuuuuuuuuuummmmmmmmmmmmmmppppppppppp :roll:

PM 04-16-2004 10:07

okay; stop bumping and show us which part of the plugins is making troubles; no one wants to read through the whole plugin ;]

ts2do 04-19-2004 10:28

Code:
public hookgrabtask(parm[]) { new id = parm[0] if(grabbed[id]) { new origin[3], moveto[3], velocity[3], length if (!is_user_alive(grabbed[id])) { unhook(id) return 0 } new Float:forigin[3] entity_get_vector(hooxtarget[id],EV_VEC_origin,forigin) get_user_origin(id, origin)//, 1) new speed = sv_hookforce new dist1[3] for(new p=0;p<3;p++){ dist1[p] = floatround(forigin[p]) } length = get_distance(dist1,origin) if(length<=20) return 0 for(new p = 0;p<3;p++){ moveto[p]=origin[p]+(floatround(forigin[p])-origin[p])*speed/length velocity[p]=(moveto[p]-origin[p]) } entity_set_vector(id, EV_VEC_velocity, Float:velocity) if(targethit[id]){ new diff[3] entity_get_vector(targethit[id],EV_VEC_origin,forigin) for(new l = 0; l < 3; l++){ diff[l] = floatround(forigin[l]) - oldtargorigin[id][l] + oldentorigin[id][l] oldtargorigin[id][l] = floatround(forigin[l]) oldentorigin[id][l]=diff[l] } entity_set_vector(hooxtarget[id],EV_VEC_origin,Float:diff) } } return 0 }
sheesh I had it highlited in red and that post up there explained that

ts2do 04-20-2004 20:29

********************
*********************
************BUMP

|2ob 04-21-2004 00:27

***********************
DOUBLE BUMP TO THE ISM!
***********************

ts2do 04-21-2004 10:11

uhhhh lol wahts an ism

ts2do 04-23-2004 10:05

:arrow:

ts2do 04-24-2004 21:40

:arrow: :arrow:

FlyingMongoose 04-24-2004 22:46

my you're impatient :P

ts2do 04-25-2004 02:04

nahhhhhh see the original post? thats been a looooooooooongggggg time

QwertyAccess 04-25-2004 04:44

its too confusing for people to help i sayz try looking over the hookmod/ninjarope plugins

ts2do 04-26-2004 00:35

welllllll ne1 who figers out the prob gets lotzzzzza credit

ts2do 04-30-2004 10:23

and any1 with bots on their server could see the bots use hook if this ever gets fixed :lol:

FlyingMongoose 04-30-2004 10:43

Code:

#include<fun>
#include<xtrafun>
#include<Vexd_Utilities>

aren't those all included in the engine module?

try changine those three just to
Code:

#include<engine>
...I think...give it a shot, it may cause more errors, but they are easily resolved issues.

BigBaller 04-30-2004 10:44

man I am half way tempted to do it my damn self so he can stop bumping this post.

p.s fun and engine are 2 diff modules.

FlyingMongoose 04-30-2004 10:47

Code:

#include<xtrafun>
#include<Vexd_Utilities>

aren't those all included in the engine module?

try changine those two just to
Code:

#include<engine>
there, fixed :P lol

BigBaller 04-30-2004 10:57

He wont be able to do this plugin at all, there is no entity_get_origin native in the engine module, their is a entity_set_origin, but no get_origin, this plugin requires a entity_get_origin native, until they add that to the engine module you cant even use this, they most likely also need to add set/get_user_velocity or I am just not able to find these in the include files.

FlyingMongoose 04-30-2004 11:07

so it's not possible yet then?

PM 04-30-2004 14:29

cant you get origin from entvars?

BigBaller 04-30-2004 19:17

Quote:

Originally Posted by PM
cant you get origin from entvars?

No, even the backwards file Vexd_Utlities dont even have these functions.

knekter 05-01-2004 10:53

lol
 
in engine cant you use this?:

Code:

entity_get_vector(hookid,EV_VEC_origin,origin)
of course the origin would be floats :)

BigBaller 05-01-2004 13:29

Re: lol
 
Quote:

Originally Posted by knekter
in engine cant you use this?:

Code:

entity_get_vector(hookid,EV_VEC_origin,origin)
of course the origin would be floats :)

Bailopan said that is wat your suppose to use for get_origin or w/e, but I am not trying to use nor convert this plugin so I dont feel like taking the time and fixing it up.

ts2do 05-02-2004 02:42

well (dot dot dot) I did go ahead and do that already... if u scrolled down a few miles, ud see that :lol:


All times are GMT -4. The time now is 21:18.

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