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

Slap function - Works. Need 1 more thing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
anxiro
Member
Join Date: Jan 2005
Old 02-08-2005 , 13:14   Slap function - Works. Need 1 more thing
Reply With Quote #1

Hi,

I got the slap function working. It takes health and you hear the "*ough*".
A simple 4 line of code. Also the player dies when health gets below 1.
But I need one more thing. The Teleport.

Can anyone help me with the teleport command?
I want the player to move in the sky, like the old slap did.

Thanks,
Frank 'anXiro' Weima
anxiro is offline
Send a message via ICQ to anxiro
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 02-08-2005 , 13:39  
Reply With Quote #2

I don't think changing the entity's origin currently works. I wasn't able to using CBaseEntity, it didn't crash when I called it, but the player wouldn't move :/

Care to post your slap code?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
sYs73m
Junior Member
Join Date: Feb 2005
Location: Maine, USA
Old 02-08-2005 , 13:40  
Reply With Quote #3

Correct me if I'm wrong, but I don't think the slap command TELEPORTED anyone, more or less I think it just dealt enough FORCE, not damage, to toss the person around. Similar to if the player was shot with, let's say and M4, in mid air. The force would throw them back.
__________________


Commander in Chief of the United States Military Clan
www.Clan-USM.com
Copyright © 2004-2006
sYs73m is offline
Send a message via AIM to sYs73m
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 02-08-2005 , 13:53  
Reply With Quote #4

CBaseEntity::Teleport works fine

Code:
	Vector vOrigin = m_pEntity->GetAbsOrigin();

	Vector vVelocity;

	vVelocity.x = floor(RANDOM_FLOAT(-800,800));
	vVelocity.y = floor(RANDOM_FLOAT(-800,800));
	vVelocity.z = floor(RANDOM_FLOAT(100,200));

	m_pEntity->Teleport(&vOrigin, NULL, &vVelocity);
__________________
Avoid like the plague.
vancelorgin is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 02-09-2005 , 08:24  
Reply With Quote #5

Quote:
Originally Posted by vancelorgin
CBaseEntity::Teleport works fine

Code:
	Vector vOrigin = m_pEntity->GetAbsOrigin();

	Vector vVelocity;

	vVelocity.x = floor(RANDOM_FLOAT(-800,800));
	vVelocity.y = floor(RANDOM_FLOAT(-800,800));
	vVelocity.z = floor(RANDOM_FLOAT(100,200));

	m_pEntity->Teleport(&vOrigin, NULL, &vVelocity);
Thanks Vancelorgin,
Now Ill add slap and bury to my plugin.
BeetleFart is offline
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 02-09-2005 , 13:59  
Reply With Quote #6

please to be crediting me and qizmo :/
__________________
Avoid like the plague.
vancelorgin is offline
theqizmo
Member
Join Date: Oct 2004
Old 02-12-2005 , 21:40  
Reply With Quote #7

At the least credit lance. Me? I'm just a noob.
theqizmo is offline
Send a message via ICQ to theqizmo Send a message via AIM to theqizmo Send a message via MSN to theqizmo
anxiro
Member
Join Date: Jan 2005
Old 02-19-2005 , 22:22  
Reply With Quote #8

CBaseEntity::Teleport ... ???
anxiro is offline
Send a message via ICQ to anxiro
anxiro
Member
Join Date: Jan 2005
Old 02-20-2005 , 08:12  
Reply With Quote #9

Allright. I edited the code. Im noobish but it works.
Also thanks goes to BeetleFart for helping me out with including.

Credits goes to The Qizmo, BeetleFart and vancelorgin.
Added the names with links in my plugin and project. Thanks all.
anxiro is offline
Send a message via ICQ to anxiro
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 19:16.


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