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

No Block at spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EasySoft
BANNED
Join Date: Jan 2010
Old 01-15-2010 , 16:21   No Block at spawn
Reply With Quote #1

Ok So I am using this code to make the players without collision.
Code:
SetEntData(entity, g_offsCollisionGroup, 2, 4, true);
How can I revert them again to collide?
EasySoft is offline
=MaTi=
Member
Join Date: Jan 2008
Old 01-15-2010 , 16:42   Re: No Block at spawn
Reply With Quote #2

Use GetEntData to find the value of g_offsCollisionGroup before changing it with SetEntData. When you want to turn collision back on, set g_offsCollisionGroup back to it's default value.
=MaTi= is offline
EasySoft
BANNED
Join Date: Jan 2010
Old 01-15-2010 , 16:49   Re: No Block at spawn
Reply With Quote #3

Quote:
Originally Posted by =MaTi= View Post
Use GetEntData to find the value of g_offsCollisionGroup before changing it with SetEntData. When you want to turn collision back on, set g_offsCollisionGroup back to it's default value.
But look.
I have this code

Code:
g_offsCollisionGroup = FindSendPropOffs("CBaseEntity", "m_CollisionGroup");
SetEntData(entity, g_offsCollisionGroup, 2, 4, true);
NOW THERE IS NO COLLISION

Now how can I turn it back on?
EasySoft is offline
=MaTi=
Member
Join Date: Jan 2008
Old 01-15-2010 , 16:55   Re: No Block at spawn
Reply With Quote #4

PHP Code:
g_offsCollisionGroup FindSendPropOffs("CBaseEntity""m_CollisionGroup");
new 
DefaultCollisionGroup GetEntData(entityg_offsCollisionGroup);
SetEntData(entityg_offsCollisionGroup24true); 
You don't really need to save that to a variable, but I don't know the collision groups, so you can simply hardcode the value later, once you know it.

Now to return the collision you do:

PHP Code:
SetEntData(entityg_offsCollisionGroupDefaultCollisionGroup4true); 
=MaTi= is offline
EasySoft
BANNED
Join Date: Jan 2010
Old 01-15-2010 , 17:14   Re: No Block at spawn
Reply With Quote #5

Quote:
Originally Posted by =MaTi= View Post
PHP Code:
g_offsCollisionGroup FindSendPropOffs("CBaseEntity""m_CollisionGroup");
new 
DefaultCollisionGroup GetEntData(entityg_offsCollisionGroup);
SetEntData(entityg_offsCollisionGroup24true); 
You don't really need to save that to a variable, but I don't know the collision groups, so you can simply hardcode the value later, once you know it.

Now to return the collision you do:

PHP Code:
SetEntData(entityg_offsCollisionGroupDefaultCollisionGroup4true); 
Thank you I'll try this.
EasySoft is offline
EasySoft
BANNED
Join Date: Jan 2010
Old 01-15-2010 , 17:31   Re: No Block at spawn
Reply With Quote #6

Nop I can't do that I need the number not DefaultCollisionGroup

Please anyone?
EasySoft is offline
meng
Veteran Member
Join Date: Oct 2005
Location: us
Old 01-15-2010 , 18:02   Re: No Block at spawn
Reply With Quote #7

5
__________________
.
[ 1 Dumerils Boa | 1 Cali King ]...
.
I'm a lil' spirituous.
meng is offline
Send a message via Yahoo to meng
EasySoft
BANNED
Join Date: Jan 2010
Old 01-15-2010 , 18:04   Re: No Block at spawn
Reply With Quote #8

Quote:
Originally Posted by meng View Post
5
hehehehe I'll try that THANK YOU SO MUCH.
EasySoft 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 06:09.


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