Raised This Month: $ Target: $400
 0% 

Send Entity to Ground


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 12-30-2013 , 01:03   Send Entity to Ground
Reply With Quote #1

PHP Code:
iEntity CreateEntityByName("item_currencypack_medium");
if(
IsValidEntityEx(iEntity))
{
    
decl Float:fOrigin[3];
    
GetClientAbsOrigin(iVictimfOrigin);

    
DispatchSpawn(iEntity);
    
TeleportEntity(iEntityfOriginNULL_VECTORNULL_VECTOR);

    
SDKHook(iEntitySDKHook_TouchOnCashTouch);

If the client's origin is above the ground, the currency will float in the air. I'm just having fun with the cash and looking to make something out of it. Just looking for a way to force the entity to the ground.
ReFlexPoison is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 12-30-2013 , 03:16   Re: Send Entity to Ground
Reply With Quote #2

I wanted to do something similiar too but had the exact same problem.
I guess the best way is to just traceray straight down and that way, get the money to spawn on ground
Pelipoika is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-30-2013 , 05:49   Re: Send Entity to Ground
Reply With Quote #3

Prent it to a nonrendered physprop, or traceray.
If you trace, make a filter that ignores all entities that are not 'worldspawn'
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Alienmario
Senior Member
Join Date: Aug 2013
Old 12-30-2013 , 12:10   Re: Send Entity to Ground
Reply With Quote #4

If you have problems with trace I could try to help.
Alienmario is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-30-2013 , 12:11   Re: Send Entity to Ground
Reply With Quote #5

You could just take a look at Friagram's gravestone plugin. does a traceray to the ground, and finds the normal plane to rotate it too.

Last edited by Mitchell; 12-30-2013 at 12:11.
Mitchell 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 20:34.


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