Raised This Month: $32 Target: $400
 8% 

[TUT] EngFunc_* Interactive tutorial


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-16-2009 , 22:58   [TUT] EngFunc_* Interactive tutorial
Reply With Quote #1

This is a small plugin that, using a visual way, shows you how does some functions works.

Commands:

CLI: tutorial1
Quote:
- FindEntityByString
You can find any entity by string using any string type pev.
CLI: tutorial2
Quote:
- FindEntityInSphere
You can find any entity in a sphere.
I found that you can't use this to search for weaponbox, armoury_entity and others. (At least it don't worked for me)
CLI: tutorial3
Quote:
- FindClientInPVS
You can find any entity in your PVS.
CLI: tutorial4
Quote:
- TraceLine
Use this to check when a line between you and your aiming point hits any entity.
CLI: tutorial5
Quote:
- TraceModel
As of TraceLine, but check for an entity who can't get a hit (ex: weaponbox)
CON: con_showents
Quote:
With this console command, you can see all entities created, the classname, the owner entity and the origin of each.
You can get more information on this thread:
http://forums.alliedmods.net/showthread.php?t=93229

Some screenshots

[IMG]http://img27.**************/img27/9766/pvsentities.th.jpg[/IMG] [IMG]http://img21.**************/img21/8986/traceline.th.jpg[/IMG]
Attached Files
File Type: sma Get Plugin or Get Source (tutorial.sma - 1195 views - 8.6 KB)
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-16-2009 , 23:11   Re: [TUT] EngFunc_* Interactive tutorial
Reply With Quote #2

Quote:
Originally Posted by joropito View Post

CLI: tutorial2
- FindEntityInSphere
You can find any entity in a sphere.
I found that you can't use this to search for weaponbox, armoury_entity and others. (At least it don't worked for me)
If anyone can check my code and fix/teach me what I'm doing wrong for this function I would be glad
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-17-2009 , 04:00   Re: [TUT] EngFunc_* Interactive tutorial
Reply With Quote #3

Quote:
Originally Posted by joropito View Post
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(originpoint6002550);    // Create green line from ID to ENT for 60 seconds
            
formatex(textcharsmax(text), "Found entity in sphere (ent:%i class:%s)"ent, class);
            
fn_log_cli(id"FindEntityInSphere"text);
        } 
->

PHP Code:
        fn_create_beam(originpoint6002550);    // Create green line from ID to ENT for 60 seconds
        
formatex(textcharsmax(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
PHP Code:
free_tr2(ptr
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 09-17-2009 , 12:02   Re: [TUT] EngFunc_* Interactive tutorial
Reply With Quote #4

nice

will for sure test it ;)
KadiR is offline
Reply


Thread Tools
Display Modes

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 11:27.


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