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

Check if entity hits ground?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rixorster
Senior Member
Join Date: Jul 2005
Old 06-03-2006 , 06:40   Check if entity hits ground?
Reply With Quote #1

How can i check if an entity named 'newEnt' hits the ground? :/ I know how to check if it hits an another entity, but i can't figure out how to check if it hits ground! o.o
__________________
You never know, what will happen the day after tomorrow...

+karma if i helped you!
Rixorster is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-03-2006 , 11:00  
Reply With Quote #2

This should work:

Code:
new bool:g_bOnGround[1024] // ... public plugin_init() {     register_think("newEnt","fnEntityThink")     // ... } public fnEntityThink(iEnt) {     new iFlags = entity_get_int(iEnt,EV_INT_flags)     if(iFlags & FL_ONGROUND && !g_bOnGround[iEnt])         // entity hit the ground, do what you want         g_bOnGround[iEnt] = (iFlags & FL_ONGROUND) ? true : false }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 17:49.


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