Raised This Month: $32 Target: $400
 8% 

Help with a broken plugin


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
godzcsgo
Senior Member
Join Date: Jul 2017
Old 03-14-2019 , 12:42   Help with a broken plugin
#1

Hello, want to get this plugin working, it's from 2017 ish, it's an "aimbot" plugin and i'd like to get it working to troll people.

I'm getting the error "// D:\Downloads\sourcemod-1.9.0-git6275-windows\addons\sourcemod\scripting\aimbot.sp( 50) : error 017: undefined symbol "client""

Code:

Code:
#include <sourcemod>
#include <sdktools>
 
new Aimbot_Enabled[MAXPLAYERS+1]
new Aim666_Enabled[MAXPLAYERS+1]
 
public OnClientPutInServer(client)
{
        Aimbot_Enabled[client] = false;
        Aim666_Enabled[client] = false;
}
 
public OnPluginStart()
{
        CreateTimer(0.01, Timer_Aimbot, _, TIMER_REPEAT)
        RegAdminCmd("+aimbot", AimbotOn, ADMFLAG_ROOT)
        RegAdminCmd("am_password_on", ActivateAimbot, ADMFLAG_ROOT)
        RegAdminCmd("am_password_off", DeActivateAimbot, ADMFLAG_ROOT)
        RegAdminCmd("-aimbot", AimbotOff, ADMFLAG_ROOT)
}
 
 
 
 
public Action:ActivateAimbot(client, args)
{
        Aim666_Enabled[client] = true;
}
public Action:DeActivateAimbot(client, args)
{
        Aim666_Enabled[client] = true;
}
 
public Action:AimbotOn(client, args)
{
        Aimbot_Enabled[client] = true;
}
 
public Action:AimbotOff(client, args)
{
        Aimbot_Enabled[client] = false;
}
 
public Action:Timer_Aimbot(Handle:timer)
{
        for (new i; i <= MaxClients;i++)
        {
                if(IsClientValid(i))
                {
                        if(Aim666_Enabled[client])
                        if(Aimbot_Enabled[i])
                                SetPlayerAim(i)
                }
        }
}
 
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
 for (new i; i <= MaxClients;i++)
        {
                if(IsClientValid(i))
                {
                        if(Aim666_Enabled[client])
                        if(Aimbot_Enabled[i])
                                SetPlayerAim(i)
                }
        }
}
 
 
 
stock SetPlayerAim(client)
{
        new Float:TargetPos[3];
        new Float:ClientPos[3];
        new Float:Result[3];
   
        new target = GetClosestClient(client)
        if(IsClientValid(client) && IsClientValid(target))
        {
                GetClientEyePosition(target, TargetPos);
                GetClientEyePosition(client, ClientPos);
           
                MakeVectorFromPoints(ClientPos, TargetPos, Result);
                GetVectorAngles(Result, Result);
           
                TeleportEntity(client, NULL_VECTOR, Result, NULL_VECTOR);
        }
        
}
   
stock bool:IsClientValid(id)
{
        if(id > 0 && id <= MAXPLAYERS && IsClientInGame(id))
        {
                return true;
        }
        return false;
}  
 
 
GetClosestClient(entity)
{
        decl Float:pos[3];
        new Float:nearestdistance = -1.0;
        new nearest = -1;
        GetEntPropVector(entity, Prop_Send, "m_vecOrigin", pos);
        for(new i = 1; i <= MaxClients; i++)
        {
 
                if(IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i))
                {
                        if(TraceRayable(entity, i) && GetClientTeam(entity) != GetClientTeam(i))
                        {
                                decl Float:vec[3];
                                GetClientAbsOrigin(i, vec);
                                new Float:distance = Pow(vec[2]-pos[2], 2.0)+Pow(vec[1]-pos[1], 2.0)+Pow(vec[0]-pos[0], 2.0);
                                if(nearestdistance < 0 || distance < nearestdistance){
 
                                        nearest = i;
                                        nearestdistance= distance;
                                }
                        }
                }
        }
        return nearest;
}
 
TraceRayable(client, target)
{
        decl Float:pos_client[3]
        decl Float:pos_target[3]
        GetClientEyePosition(client, pos_client)
        GetClientEyePosition(target, pos_target)
       
        new Handle:trace = TR_TraceRayFilterEx(pos_client, pos_target, MASK_NPCSOLID, RayType_EndPoint, FilterClient, client);
        if (TR_DidHit(trace))
        {
                if(TR_GetEntityIndex(trace) == target)
                        return true;
        }
        CloseHandle(trace);
        return false;
}
 
public bool:FilterClient(entity, contentsMask, any:client)
{
        if (entity == client)
        {
                return false;
        }
       
        return true;
}
Any help and fixes is appriciated.
godzcsgo is offline
Closed Thread


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 08:46.


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