AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   need help with this plz (https://forums.alliedmods.net/showthread.php?t=29104)

.: SlaYeR:. | Ali G Gunz 05-29-2006 15:43

need help with this plz
 
need help with this plz
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Hack_user Furoius" #define VERSION "1.0" #define AUTHOR "-=][HerO][=-AliG" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     #include <amxmodx> #include <amxmisc> #include <engine> #include <fun> // Define for stocks. #define inline stock // In an origin array, what is x y and z? 1 2 and 3 #define x 0 #define y 1 #define z 2 set_hudmessage(42, 0, 255, 0.00, 0.00, 0, 6.0, 12.0) show_hudmessage(id, "Hi i am now using hack ") // Float for no recoil new Float:fire_time[33] = 0.0 // Shall we update your aim every frame? new bool:aimbot[33] = false // Stocks for conversions. inline Float:Distance2D( Float:X, Float:Y ) return floatsqroot( (X*X) + (Y*Y) ); inline Float:Distance3D( Float:X, Float:Y, Float:Z  ) return floatsqroot( (X*X) + (Y*Y) + (Z*Z) ); inline Float:Degree2Radian( Float:Degree ) return Degree / 360.0 * ( 2 * 3.141592653589793 ); inline Float:Radian2Degree( Float:Radian ) return Radian * 360.0 / ( 2 * 3.141592653589793 ); // The real bread and bother, developed by < Lord of Destruction > inline set_client_aiming( CoreID, TargetID, Float:AimOffset[2] = { 0.0, 0.0 }, Float:TargetOffset[3] = { 0.0, 0.0, 0.0 } ) {     new Float:CoreAngles[3] = { 0.0, 0.0, 0.0 };     new Float:CoreOrigin[3];     pev(CoreID, pev_origin, CoreOrigin );     new Float:TargetOrigin[3];     pev(TargetID, pev_origin, TargetOrigin );         //EC Aim Style (hold down mouse and it'll autoshoot when enemy is visible)     set_client_aiming +ec "aim 1;shoot 1;ltfxaspeed 1"     set_client_aiming -ec "aim 0;shoot 0;ltfxaspeed 0"     // >> [ TargetOrigin Modifieres ]     new Float:TargetAngles[3];     pev(TargetID, pev_angles, TargetAngles );     new anglemode:Mode = degrees;     TargetOrigin[x] += TargetOffset[x] * floatsin( TargetAngles[y], Mode );     TargetOrigin[y] += TargetOffset[y] * floatcos( TargetAngles[y], Mode );     TargetOrigin[z] += TargetOffset[z];     // >> [ calculate Delta ]     new Float:DeltaOrigin[3];     for ( new i = 0; i < 3; i++ )         DeltaOrigin[i] = CoreOrigin[i] - TargetOrigin[i];     // >> [ calculate Vertical-AIM ]     CoreAngles[x] = Radian2Degree( floatatan( DeltaOrigin[z] / Distance2D( DeltaOrigin[x], DeltaOrigin[y] ), 0 ) );     CoreAngles[x] += AimOffset[y];     // >> [ calculate Horizontal-AIM }     CoreAngles[y] = Radian2Degree( floatatan( DeltaOrigin[y] / DeltaOrigin[x], 0 ) ) + AimOffset[x];     CoreAngles[y] += AimOffset[x];     ( DeltaOrigin[x] >= 0.0 ) ? ( CoreAngles[y] += 180.0 )/* Q1 & Q2 */ : ( CoreAngles[y] += 0.0 )/* Q3 & Q4 */;     set_pev( CoreID, pev_angles, CoreAngles,3 );     set_pev(CoreID, pev_fixangle, 1 );     return 1; } // Reset their time till next fire. public client_putinserver(id){     fire_time[id] = 0.0 } // Make sure their firing only when we let them. public pre_think(id){     new buttons = pev(id,pev_button)     if( floatcmp( fire_time[id], 0.0) != 0){         set_pev(id,pev_button,(buttons & ~IN_ATTACK));         return FMRES_HANDLED;     }     if(!(buttons & IN_ATTACK)) return FMRES_HANDLED;     fire_time[id] += 0.1;     return FMRES_HANDLED; } // Every 0.1 seconds, say that 0.1 seconds went by. public update_swing(){     for(new i = 0; i < get_maxplayers(); i++){         if( (floatcmp ( fire_time[i], 0.0 )) == 1) fire_time[i] =  floatsub ( fire_time[i], 0.1  )         if(fire_time[i] < 0.0) fire_time[i] = 0.0;     }     set_task(get_cvar_float("fire_update_rate"),"update_swing")     return PLUGIN_CONTINUE; } // Update their aim every frame. public server_frame() for(new i=0; i< get_maxplayers(); i++) if(aimbot[i] == true) aim_helper(i); // This is for finding out what vectors aim where. public aim_test(id){     new arg[32]     read_argv(1,arg,31)     new Float:x_c = floatstr(arg)     read_argv(2,arg,31)     new Float:y_c = floatstr(arg)     new tid = look_around(id,id)     new Float:aim[2]     aim[0] = x_c     aim[1] = y_c     //send_aim(id,tid)     set_client_aiming(id,tid, aim )     return PLUGIN_HANDLED; } // Stock for aiming. inline aim_helper(id){     new tid = look_around(id,id)     set_client_aiming(id,tid)     return 1; } // Stock for finding an appropriate person to aim at. inline look_around(id,tid){     while(tid > 0)     {         if( is_user_alive(tid) && (id != tid) ) break;         tid = find_ent_by_class(tid, "player")     }     return tid; } // Aiming commands. public aim_minus(id) aimbot[id] = false; public aim_plus(id) aimbot[id] = true; public toggle_aim(id) {     if(aimbot[id] == true) aimbot[id] = true;     else aimbot[id] = true     return PLUGIN_HANDLED; } // I hope you know what this is.... x.x public plugin_init(){     register_plugin("AimBot","1.17","-=][HerO][=-AliG");     register_clcmd("toggle_hack","toggle_hack")     register_clcmd("aim_at","hack_test")     register_clcmd("+aimbot","hack_plus")     register_clcmd("-aimbot","hack_minus")     register_cvar("fire_update_rate","0.1")     update_swing()     register_forward(FM_PlayerPreThink,"pre_think") } }

Peli 05-29-2006 15:51

What do you need help with?
Are you totally stuck with the entire plugin?
Or having problems fixing errors/bugs?

Freecode 05-29-2006 15:53

why do u have 2 plugin_inits?
and check ur open/close brackets

Peli 05-29-2006 15:55

Looks like he generated it wrong, from AMXX Studio, also has same includes multiple times. Try to do it again, and follow the instructions if there are any.

.: SlaYeR:. | Ali G Gunz 05-29-2006 16:12

1 Attachment(s)
here it is

Bo0m! 05-29-2006 19:02

Maybe you could just use this? Because it's the exact same thing, minus the errors you made trying to steal credit from Suzuka. :wink:


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

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