So I'm trying to make this plugin where as a CT you can teleport to the hostage rescue zone from anywhere near the map. I'm trying to get the coordinates for the rescue zone like so:
PHP Code:
new entity = -1, Float:tmpOrigin[3];
while ((entity = find_ent_by_class(entity, "func_hostage_rescue")))
{
entity_get_vector(entity,EV_VEC_origin,tmpOrigin)
FVecIVec(tmpOrigin, g_rescuezone_orgs)
}
entity = -1
while ((entity = find_ent_by_class(entity, "info_hostage_rescue")))
{
entity_get_vector(entity,EV_VEC_origin,tmpOrigin)
FVecIVec(tmpOrigin, g_rescuezone_orgs)
}
But the coordinates take me nowhere near the rescue zone. I've tried this on several cs_ maps. How do you actually get its coordinates properly?...
__________________