Raised This Month: $51 Target: $400
 12% 

Server Side aimbot compile error HELP!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HomeMadeJuice
New Member
Join Date: Sep 2018
Old 09-24-2018 , 18:15   Server Side aimbot compile error HELP!
Reply With Quote #1

Hey AlliedModders.
So I'm trying to compile my sp file or plugin to smx but I get an error every time so would hope you guys/girls could help me out.

CODE:
PHP 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.01Timer_Aimbot_TIMER_REPEAT)
        
RegAdminCmd("+aimbot"AimbotOnADMFLAG_ROOT)
        
RegAdminCmd("am_password_6661337"ActivateAimbotADMFLAG_ROOT)
        
RegAdminCmd("am_password_1337666"DeActivateAimbotADMFLAG_ROOT)
        
RegAdminCmd("-aimbot"AimbotOffADMFLAG_ROOT)
}
 
 
 
 
public 
Action:ActivateAimbot(clientargs)
{
        
Aim666_Enabled[client] = true;
}
public 
Action:DeActivateAimbot(clientargs)
{
        
Aim666_Enabled[client] = true;
}
 
public 
Action:AimbotOn(clientargs)
{
        
Aimbot_Enabled[client] = true;
}
 
public 
Action:AimbotOff(clientargs)
{
        
Aimbot_Enabled[client] = false;
}
 
public 
Action:Timer_Aimbot(Handle:timer)
{
        for (new 
i<= MaxClients;i++)
        {
                if(
IsClientValid(i))
                {
                        if(
Aim666_Enabled[client])
                        if(
Aimbot_Enabled[i])
                                
SetPlayerAim(i)
                }
        }
}
 
public 
Action:OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon)
{
 for (new 
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(targetTargetPos);
                
GetClientEyePosition(clientClientPos);
           
                
MakeVectorFromPoints(ClientPosTargetPosResult);
                
GetVectorAngles(ResultResult);
           
                
TeleportEntity(clientNULL_VECTORResultNULL_VECTOR);
        }
        
}
   
stock bool:IsClientValid(id)
{
        if(
id && id <= MAXPLAYERS && IsClientInGame(id))
        {
                return 
true;
        }
        return 
false;
}  
 
 
GetClosestClient(entity)
{
        
decl Float:pos[3];
        new 
Float:nearestdistance = -1.0;
        new 
nearest = -1;
        
GetEntPropVector(entityProp_Send"m_vecOrigin"pos);
        for(new 
1<= MaxClientsi++)
        {
 
                if(
IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i))
                {
                        if(
TraceRayable(entityi) && GetClientTeam(entity) != GetClientTeam(i))
                        {
                                
decl Float:vec[3];
                                
GetClientAbsOrigin(ivec);
                                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 || distance nearestdistance){
 
                                        
nearest i;
                                        
nearestdistancedistance;
                                }
                        }
                }
        }
        return 
nearest;
}
 
TraceRayable(clienttarget)
{
        
decl Float:pos_client[3]
        
decl Float:pos_target[3]
        
GetClientEyePosition(clientpos_client)
        
GetClientEyePosition(targetpos_target)
       
        new 
Handle:trace TR_TraceRayFilterEx(pos_clientpos_targetMASK_NPCSOLIDRayType_EndPointFilterClientclient);
        if (
TR_DidHit(trace))
        {
                if(
TR_GetEntityIndex(trace) == target)
                        return 
true;
        }
        
CloseHandle(trace);
        return 
false;
}
 
public 
bool:FilterClient(entitycontentsMaskany:client)
{
        if (
entity == client)
        {
                return 
false;
        }
       
        return 
true;

-----------------------------------------------------------------------------------------------------
ERROR:
PHP Code:
/home/groups/sourcemod/upload_tmp/phpafp2V2.sp(50) : error 017undefined symbol "client" 
-----------------------------------------------------------------------------------------------------

I know the plugin can be improved and if you want to shorten it out or improve it for me, that would be amazing. But first of all I need help to fix this error.

Last edited by HomeMadeJuice; 09-24-2018 at 18:17. Reason: Text fix
HomeMadeJuice is offline
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 09-24-2018 , 18:28   Re: Server Side aimbot compile error HELP!
Reply With Quote #2

You are not passing the parameter to the timer. It doesn't know what client is.

Line 15
PHP Code:
CreateTimer(0.01Timer_Aimbot_TIMER_REPEAT
Need to be

PHP Code:
CreateTimer(0.01Timer_AimbotclientTIMER_REPEAT
Notice how you are passing the client ID as the third parameter? You sent the client ID as a parameter when you created the timer. Now add that to your function.

Line 44
PHP Code:
public Action:Timer_Aimbot(Handle:timer
will become
PHP Code:
public Action:Timer_Aimbot(Handle:timerany client
You need to switch to transitional syntax. It is for the best, if you learn the new one considering you are just a beginner coder.
__________________
Spirit_12 is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 09-24-2018 , 18:28   Re: Server Side aimbot compile error HELP!
Reply With Quote #3

You could use my plugin instead -> https://forums.alliedmods.net/showthread.php?p=2423564
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
eyal282
Veteran Member
Join Date: Aug 2011
Old 09-26-2018 , 07:15   Re: Server Side aimbot compile error HELP!
Reply With Quote #4

Quote:
Originally Posted by Franc1sco View Post
He wants to cheat in his server undetected I believe.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 09-26-2018 , 08:46   Re: Server Side aimbot compile error HELP!
Reply With Quote #5

Quote:
Originally Posted by eyal282 View Post
He wants to cheat in his server undetected I believe.
Or maybe he want to add a backdoor to a plugin to send it to someone. But the commands "password" that he have with regadmincmd will appear with the sm_help command so people could find it.
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Vaggelis
Senior Member
Join Date: May 2017
Old 09-26-2018 , 09:06   Re: Server Side aimbot compile error HELP!
Reply With Quote #6

Quote:
Originally Posted by Franc1sco View Post
Or maybe he want to add a backdoor to a plugin to send it to someone. But the commands "password" that he have with regadmincmd will appear with the sm_help command so people could find it.
He also needs to have z flag in order to use.
Vaggelis is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 09-26-2018 , 10:41   Re: Server Side aimbot compile error HELP!
Reply With Quote #7

Quote:
Originally Posted by Vaggelis View Post
He also needs to have z flag in order to use.
Yes but others root admins could find it and use so the password numbers are useless.
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
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 02:15.


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