Raised This Month: $1950 Target: $400
 487% 

LineGoesThroughSmoke (CSGO)


Post New Thread Reply   
 
Thread Tools Display Modes
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, 112 views)

Last edited by SM9; 01-28-2020 at 11:54. Reason: Updated Gamedata
SM9 is offline
SM9
Veteran Member
Join Date: Sep 2013
Location: United Kingdom
Old 01-28-2020 , 11:54   Re: LineGoesThroughSmoke (CSGO)
Reply With Quote #2

Gamedata updated.
SM9 is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 03-23-2020 , 20:32   Re: LineGoesThroughSmoke (CSGO)
Reply With Quote #3

Hi, I think this might need an update because as of CS:GO version 1.37.4.5 this is stock is crashing my server.
__________________
manicogaming is offline
Reply


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


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