Raised This Month: $ Target: $400
 0% 

to expert coder only


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[CCC]Taz-Devil
Junior Member
Join Date: Apr 2004
Old 07-07-2004 , 13:28   to expert coder only
Reply With Quote #1

Hi, all

i have one question, i need to use "pvPrivateData" to modify the value of "m_bloodColor".

How do you get the OFFSET value ? like OFFSET_CSMONEY, etc...
#define OFFSET_CSMONEY 115 ??

exemple :
Code:
// Give money
	*((int *)pPlayer->pvPrivateData + OFFSET_CSMONEY) = params[2];
Thx
__________________
Sauvez les diables de Tazmanie !

[CCC]Taz-Devil is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 07-07-2004 , 14:44  
Reply With Quote #2

*moved*

I don't think blood can be modified this way - because adjusting values off the pvPrivateData of an entity's data structure does just that - it modifies the properties/values of a specific existing entity. And blood afaik is not an entity in that sense.

My guess is that blood is only handled by the client and thus is impossible to change, or that it is at least created by some kind of message from server, possibly as "tempentity" which is something that is sent from server and then only handled by the client. Maybe your best shot is trying to modify the color of that. I think we had someone doing this recently...

*edit*

Here's const.h from hl sdk for you:

Code:
#define	TE_BLOODSTREAM		101		// particle spray
// coord coord coord (start position)
// coord coord coord (spray vector)
// byte (color)
// byte (speed)

#define TE_BLOOD			103		// particle spray
// coord coord coord (start position)
// coord coord coord (spray vector)
// byte (color)
// byte (speed)

#define TE_BLOODSPRITE		115		// spray of opaque sprite1's that fall, single sprite2 for 1..2 secs (this is a high-priority tent)
// coord, coord, coord (position)
// short (sprite1 index)
// short (sprite2 index)
// byte (color)
// byte (scale)
These look plausible to me, they are all temp-ents. :-) Try to hook these and resend them with another colour.


Here's the other thread of about the same stuff: http://forums.alliedmods.net/showthread.php?t=3134
Johnny got his gun is offline
[CCC]Taz-Devil
Junior Member
Join Date: Apr 2004
Old 07-07-2004 , 15:25  
Reply With Quote #3

thankx,

I know this method, (capture event),
but when you look HL source:
Code:
void CBasePlayer::Spawn( void )
{
	pev->classname		= MAKE_STRING("player");
	pev->health			= 100;
...
	m_bloodColor	= BLOOD_COLOR_RED;
}
or
Code:
	// copy owner's blood color
		pGib->m_bloodColor = (CBaseEntity::Instance(pevVictim))->BloodColor();
the m_bloodColor is define on spwan player ??!!

but my real question it is about "pvPrivateData" how do you identify "pvPrivateData" and get the offset value ?

an other answer on bots-united.
http://forums.bots-united.com/showthread.php?t=2221

thx
__________________
Sauvez les diables de Tazmanie !

[CCC]Taz-Devil is offline
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 07-07-2004 , 18:33  
Reply With Quote #4

Quote:
Originally Posted by [CCC
Taz-Devil]
but my real question it is about "pvPrivateData" how do you identify "pvPrivateData" and get the offset value ?
this may help you: http://djeyl.net/forum/index.php?showtopic=7162
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
[CCC]Taz-Devil
Junior Member
Join Date: Apr 2004
Old 07-08-2004 , 06:38  
Reply With Quote #5

Thx dude.
i ll test for blood..
and i post a message if it's ok..
Thx
__________________
Sauvez les diables de Tazmanie !

[CCC]Taz-Devil 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 13:28.


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