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

LineGoesThroughSmoke (CSGO)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 02-24-2019 , 09:54   LineGoesThroughSmoke (CSGO)
Reply With Quote #1

Posting on behalf of my friend who is banned but wants to help others

PHP Code:
#include sdktools

stock bool LineGoesThroughSmoke(float from[3], float to[3])
{
    static 
Address TheBots;
    static 
Handle CBotManager_IsLineBlockedBySmoke;
    static 
int OS;
    
    if(
OS == 0)
    {
        
Handle hGameConf LoadGameConfigFile("LineGoesThroughSmoke.games");
        if(!
hGameConf)
        {
            
SetFailState("Could not read LineGoesThroughSmoke.games.txt");
            return 
false;
        }
        
        
OS GameConfGetOffset(hGameConf"OS");
        
        
TheBots GameConfGetAddress(hGameConf"TheBots");
        if(!
TheBots)
        {
            
CloseHandle(hGameConf);
            
SetFailState("TheBots == null");
            return 
false;
        }
        
        
StartPrepSDKCall(SDKCall_Raw);
        
PrepSDKCall_SetFromConf(hGameConfSDKConf_Signature"CBotManager::IsLineBlockedBySmoke");
        
PrepSDKCall_AddParameter(SDKType_VectorSDKPass_Pointer);
        
PrepSDKCall_AddParameter(SDKType_VectorSDKPass_Pointer);
        if(
OS == 1PrepSDKCall_AddParameter(SDKType_FloatSDKPass_Plain);
        
PrepSDKCall_SetReturnInfo(SDKType_BoolSDKPass_Plain);
        if(!(
CBotManager_IsLineBlockedBySmoke EndPrepSDKCall()))
        {
            
CloseHandle(hGameConf);
            
SetFailState("Failed to get CBotManager::IsLineBlockedBySmoke function");
            return 
false;
        }
        
        
CloseHandle(hGameConf);
    }
    
    if(
OS == 1) return SDKCall(CBotManager_IsLineBlockedBySmokeTheBotsfromto1.0);
    return 
SDKCall(CBotManager_IsLineBlockedBySmokeTheBotsfromto);

Anyone that knows how to use this code will know that loading the game data should be separated, this was written for a quick test.

Credits to
komashchenko
Attached Files
File Type: txt LineGoesThroughSmoke.games.txt (956 Bytes, 199 views)

Last edited by SM9; 01-28-2020 at 11:54. Reason: Updated Gamedata
SM9 is offline
 



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 05:25.


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