AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pev_origin Returns zero ! // EV_VEC_origin returns zero ! (https://forums.alliedmods.net/showthread.php?t=160018)

byetovice 06-24-2011 06:22

pev_origin Returns zero ! // EV_VEC_origin returns zero !
 
PHP Code:

public spawn_zombies(TaskID)
{

new 
Float:Origin[3], target[32]
for(new 
i=33;i<=entity_count();i++)
{
if(
is_valid_ent(i))
{
pev(ipev_targetnametarget31)
if(
equali(target"zmSpawn"))
{
entity_get_vector(i,EV_VEC_originOrigin)
engfunc(EngFunc_TraceHullOriginOriginIGNORE_MONSTERSHULL_HUMAN00);
if(!
get_tr2(0,TR_StartSolid)) client_print(0,print_chat,"x:%f y:%f z:%f",Origin[0],Origin[1],Origin[2])
}
}


There is 4 entity named "zmSpawn" in map !
Output :
Code:

x : 0.000000 y: 0.0000000 z:0.0000000
x : 0.000000 y: 0.0000000 z:0.0000000
x : 0.000000 y: 0.0000000 z:0.0000000
x : 0.000000 y: 0.0000000 z:0.0000000

Please help me to find the problem :cry:

Exolent[jNr] 06-24-2011 09:43

Re: pev_origin Returns zero ! // EV_VEC_origin returns zero !
 
Try getting the brush entity origin.

byetovice 06-24-2011 13:57

Re: pev_origin Returns zero ! // EV_VEC_origin returns zero !
 
ok. solved, thanks =D


All times are GMT -4. The time now is 23:29.

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