Quote:
Originally Posted by joropito
If anyone can check my code and fix/teach me what I'm doing wrong for this function I would be glad
|
PHP Code:
if(equal(class, "func_buyzone") || equal(class, "player") || equal(class, "func_bomb_target")
|| equal(class, "func_breakable") || equal(class, "func_door"))
{
fn_create_beam(origin, point, 60, 0, 255, 0); // Create green line from ID to ENT for 60 seconds
formatex(text, charsmax(text), "Found entity in sphere (ent:%i class:%s)", ent, class);
fn_log_cli(id, "FindEntityInSphere", text);
}
->
PHP Code:
fn_create_beam(origin, point, 60, 0, 255, 0); // Create green line from ID to ENT for 60 seconds
formatex(text, charsmax(text), "Found entity in sphere (ent:%i class:%s)", ent, class);
fn_log_cli(id, "FindEntityInSphere", text);
Also try not using the trace_handle 0 (global tracehandle)
Create one using
PHP Code:
ptr = create_tr2()
And after that free it using
__________________