Raised This Month: $ Target: $400
 0% 

check if entity exist on coordinates


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 07-31-2013 , 15:57   Re: check if entity exist on coordinates
Reply With Quote #1

I did debug when it creates entity like so , not sure if its correct code

PHP Code:
Create_Items(Origin[3])
{
    new 
Float:flOrigin[3]
    
IVecFVec(OriginflOrigin)
    new 
ent find_ent_by_class(-1,"dm_ammo_grenade");
        if(
get_brush_entity_origin(ent,flOrigin) == 0) {
        
client_print(0,3,"entity not found")
        
        }
        if(
get_brush_entity_origin(ent,flOrigin) == 1) {
        
client_print(0,3,"entity found")
        
        }


So I need to check if any entity exist on these Origin[3] before create it here

this code catch spawn of other entities too.... so I see "entity found" even this one is not spawned yet.
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne 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 15:58.


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