check if entity exist on coordinates
Lets say I have coordinates written to the file 123.cfg like this
Code:
-118 -1624 -475(cheap suits code) PHP Code:
|
Re: check if entity exist on coordinates
Create g_MapItemOrgins[X][3].
In g_MapItemOrgins[X][3] keep 1 if spawned else 0. While spawning Items check if g_MapItemOrgins[X][3] is 0/1. If 0 spawn. ELSE find entity by class() and Quote:
|
Re: check if entity exist on coordinates
I did debug when it creates entity like so , not sure if its correct code
PHP Code:
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. |
Re: check if entity exist on coordinates
You are checking if entity exists in world or not. You have to check if the both origins, Origin and flOrigin are equal or not. Call this function before Create_Items().
PHP Code:
Quote:
|
Re: check if entity exist on coordinates
Why would items be spawned twice if you spawn them only once at map start ?
Also, use str_to_float instead of str_to_num |
| All times are GMT -4. The time now is 15:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.