AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Check if entity hits ground? (https://forums.alliedmods.net/showthread.php?t=29321)

Rixorster 06-03-2006 06:40

Check if entity hits ground?
 
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

Hawk552 06-03-2006 11:00

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 }


All times are GMT -4. The time now is 16:30.

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