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

[SOLVED][CS:GO] How to use ItempEntSystem?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
woodpecker
New Member
Join Date: Nov 2014
Old 11-23-2014 , 09:57   [SOLVED][CS:GO] How to use ItempEntSystem?
Reply With Quote #1

Hello I want to know How to use ITempEntSystem in CSGO Windows server.

Old CS:S code

Code:
#define VTBL(classptr) (*(DWORD*)classptr) 
#define PVFN_(classptr, offset) (VTBL(classptr) + offset) 
#define VFN_(classptr, offset) *(DWORD*)PVFN_(classptr, offset) 
#define VFN(classptr, offset) VFN_(classptr, (offset * sizeof(void*)))

effects = (IEffects*)gameServerFactory(IEFFECTS_INTERFACE_VERSION, NULL); 
te = **(ITempEntsSystem***)(VFN(effects, 3) + 107);

te->BeamPoint(.....);
old CS:S code tempent is very easy

CSGO code sigscan (work)
PHP Code:
#define CBaseTempEntity_Sig "\x89\x41\x04\xA1\x2A\x2A\x2A\x2A\x89\x41\x08\x89\x0D\x2A\x2A\x2A\x2A\xC7"
#define CBaseTempEntity_mask "xxxx????xxxxx????x"
#define CBaseTempEntity_byte 18
(....sigscan...)
void CBaseTempEntity_Class =  **(void ***)((unsigned char *)CBaseTempEntity_Sig.addr 4); 
CSGO code draw beampoint (work)
PHP Code:
void BeamPoints(IRecipientFilterfiler,Vector startVector  endint modelindex,    float lifefloat width,int rint gint bint  aint speed){
    
ServerClass m_Temp_BeamPoints_Class getServerClass("CTEBeamPoints");
    
void addr getTempEntAddress("BeamPoints");
    if (
addr != NULL){
        
SendTable *table m_Temp_BeamPoints_Class->m_pTable;
        if (
table){
            *(
Vector *)((unsigned char *)addr TableFindOffset(table"m_vecStartPoint")) = start;
            *(
Vector *)((unsigned char *)addr TableFindOffset(table"m_vecEndPoint")) = end;
            *(
int *)((unsigned char *)addr TableFindOffset(table"m_nModelIndex")) = modelindex;
            *(
int *)((unsigned char *)addr TableFindOffset(table"m_nHaloIndex")) = 0;
            *(
int *)((unsigned char *)addr TableFindOffset(table"m_nStartFrame")) = 0;
            *(
int *)((unsigned char *)addr TableFindOffset(table"m_nFrameRate")) = 10;
            *(
float *)((unsigned char *)addr TableFindOffset(table"m_fLife")) = life;
            *(
float *)((unsigned char *)addr TableFindOffset(table"m_fWidth")) = width;
            *(
float *)((unsigned char *)addr TableFindOffset(table"m_fEndWidth")) = width;
            *(
int *)((unsigned char *)addr TableFindOffset(table"m_nFadeLength")) = 255;
            *(
float *)((unsigned char *)addr TableFindOffset(table"m_fAmplitude")) = 1.0f;
            *(
int *)((unsigned char *)addr TableFindOffset(table"m_nSpeed")) = speed;
            *(
int *)((unsigned char *)addr TableFindOffset(table"r")) = r;
            *(
int *)((unsigned char *)addr TableFindOffset(table"g")) = g;
            *(
int *)((unsigned char *)addr TableFindOffset(table"b")) = b;
            *(
int *)((unsigned char *)addr TableFindOffset(table"a")) = a;
            
pEngine->PlaybackTempEntity(filer0.0faddr,  m_Temp_BeamPoints_Class->m_pTable,  m_Temp_BeamPoints_Class->m_ClassID);
        }
    }

CSGO code getServerClass (work)
PHP Code:
ServerClass getServerClass(const char*name){
    
ServerClass *pClass pGameDLL->GetAllServerClasses();
    while (
pClass)
    {
        if (!
strcmpi(pClass->m_pNetworkNamename)){
            return 
pClass;
        }
        
pClass pClass->m_pNext;
    }
    return 
NULL;

CSGO code gettempentaddr (work)
PHP Code:
void getTempEntAddress(const char name){
      
void iter CBaseTempEntity_Class;
      while (
iter)
      {
            const 
char *getname = *(const char **)((unsigned char *)iter 4);
            if (!
getname)
            {
                  continue;
            }
            if(
strcmp(getname,name)==0){
                  return 
iter;
            }
            
iter = *(void **)((unsigned char *)iter 8);
      }
      return 
NULL;

CSGO code getTableOffset (work)
PHP Code:
int TableFindOffset(SendTable *pTable, const char *name)
{
    
int count pTable->GetNumProps();
    
SendProp *pProp;
    for (
int i 0i<counti++)
    {
        
pProp pTable->GetProp(i);
        if (
strcmp(pProp->GetName(), name) == 0)
        {
            return 
pProp->GetOffset();
        }
        if (
pProp->GetDataTable())
        {
            
int ret TableFindOffset(pProp->GetDataTable(), name);
            if (
ret != NULL){
                return 
ret;
            }
        }
    }
    return 
NULL;

no error but does not work
anyone can help me?
please idea..
thank you

Last edited by woodpecker; 11-23-2014 at 15:15.
woodpecker is offline
donrevan
AlliedModders Donor
Join Date: Jul 2010
Old 11-23-2014 , 12:10   Re: [CS:GO] How to use ItempEntSystem?
Reply With Quote #2

Use IEffects interface directly if possible.


Quote:
Originally Posted by woodpecker View Post
Old CS code

Code:
#define VTBL(classptr) (*(DWORD*)classptr) 
#define PVFN_(classptr, offset) (VTBL(classptr) + offset) 
#define VFN_(classptr, offset) *(DWORD*)PVFN_(classptr, offset) 
#define VFN(classptr, offset) VFN_(classptr, (offset * sizeof(void*)))

effects = (IEffects*)gameServerFactory(IEFFECTS_INTERFACE_VERSION, NULL); 
te = **(ITempEntsSystem***)(VFN(effects, 3) + 107);

te->BeamPoint(.....);
You say this is old code, the offsets are most-likely outdated.

Last edited by donrevan; 11-23-2014 at 12:10.
donrevan is offline
woodpecker
New Member
Join Date: Nov 2014
Old 11-23-2014 , 15:05   Re: [CS:GO] How to use ItempEntSystem?
Reply With Quote #3

thanks donrevan !

sorry.. I was basic mistake.
my bad..

texture modelindex is ..
PHP Code:
g_iBeamTexture pEngine->PrecacheModel("sprites/lgtning.vmt"); 
this texture is Not Found in CSGO

PHP Code:
g_iBeamTexture pEngine->PrecacheModel("sprites/bluelaser1.vmt"); 
its work ! yay
woodpecker is offline
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 14:29.


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