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

Player properties


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-07-2016 , 17:25   Player properties
Reply With Quote #1

Somebody know a right method of setting player health ,armor, gravity and speed for CS:GO?
And also how to switch team?
__________________

Last edited by gubka; 12-07-2016 at 17:31.
gubka is offline
Send a message via ICQ to gubka
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-07-2016 , 18:08   Re: Player properties
Reply With Quote #2

I Understand that i need to get them in that way, but how apply them

PHP Code:
    /** HEALTH */
    
gamehelpers->FindSendPropInfo("CCSPlayer""m_iHealth", &prop);
    
m_iHealth prop.actual_offset;
    
    
/** GRAVITY */
    
gamehelpers->FindSendPropInfo("CCSPlayer""m_flGravity", &prop);
    
m_flGravity prop.actual_offset;
    
    
/** SPEED */
    
gamehelpers->FindSendPropInfo("CCSPlayer""m_flLaggedMovementValue", &prop);
    
m_flLaggedMovementValue prop.actual_offset;
    
    
/** ARMOR */
    
gamehelpers->FindSendPropInfo("CCSPlayer""m_ArmorValue", &prop);
    
m_iArmorValue prop.actual_offset;
    
    
/** TEAM */
    
gamehelpers->FindSendPropInfo("CCSPlayer""m_iTeam", &prop);
    
m_iTeam prop.actual_offset


SOLVED

Quote:
void UTIL_SetHealth(CBaseEntity *pEntity, int iHealth)
{
// If offset wasn't find, then stop
if (!m_iHealth)
{
return;
}

// Set value on success
unsigned char *ptr = (unsigned char *)(pEntity) + m_iHealth;
(*(char *)ptr = iHealth);
}
__________________

Last edited by gubka; 12-07-2016 at 18:40.
gubka is offline
Send a message via ICQ to gubka
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-09-2016 , 07:59   Re: Player properties
Reply With Quote #3

Don't forget to call SetEdictStateChanged as well.
__________________
asherkin is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-09-2016 , 09:43   Re: Player properties
Reply With Quote #4

Quote:
Originally Posted by asherkin View Post
Don't forget to call SetEdictStateChanged as well.
Oh thanks, so may be with that speed prop will start work
__________________
gubka is offline
Send a message via ICQ to gubka
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 12-09-2016 , 10:37   Re: Player properties
Reply With Quote #5

Quote:
Originally Posted by asherkin View Post
Don't forget to call SetEdictStateChanged as well.
So also i cant find m_flGravity prop for CCSPlayer in the CS GO, i use m_flFallVelocity instead , is it same thing?
__________________
gubka is offline
Send a message via ICQ to gubka
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:53.


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