AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Pallets with Bags (https://forums.alliedmods.net/showthread.php?t=52927)

SAMURAI16 03-23-2007 10:11

Re: Pallets with Bags
 
Quote:

Originally Posted by hjkwe654 (Post 455843)
.sma ?

Sorry the site i think is momentan with problems . I can't upload the sma

manchimocyrus 03-23-2007 10:14

Re: Pallets with Bags
 
samurai16 the .sma??????????????

SAMURAI16 03-23-2007 10:17

Re: Pallets with Bags
 
Quote:

Originally Posted by manchimocyrus (Post 455858)
samurai16 the .sma??????????????

Sorry the site i think is momentan with problems . I can't upload the sma

SAMURAI16 03-23-2007 12:12

Re: Pallets with Bags
 
Quote:

Originally Posted by VEN (Post 455531)

Of course it's good that you've been informed about this stock but unfortunately you haven't been informed how to use it. I.e.
Code:
hull = pev(id, pev_flags) & HULL_HUMAN

Do you realise what you are doing here? Please tell me.

I used that to check for the free spot. It's the first time when i used . I saw in hlds_const HULL defines and i decided to use HULL_HUMAN. I tested on server, and seems to can't place models on air.
Please tell a good method to use it

VEN 03-23-2007 12:16

Re: Pallets with Bags
 
Quote:

I saw in hlds_const HULL defines and i decided to use HULL_HUMAN
Quote:

Originally Posted by hlsdk_const.inc
// The hullnumber paramater of EngFunc_TraceHull, EngFunc_TraceModel and DLLFunc_GetHullBounds

I think you didn't get my question. Do you understand what you are doing below?
Quote:

hull = pev(id, pev_flags) & HULL_HUMAN

SAMURAI16 03-23-2007 12:38

Re: Pallets with Bags
 
not verry sure . Can explain me with high details ?
I used that way, because that comes on my brain, i tested an worked anyway

VEN 03-23-2007 13:26

Re: Pallets with Bags
 
HULL_* isn't related to entity flags constants directly because flags is using FL_* constants, so you can't just do: hull = pev(id, pev_flags) & HULL_HUMAN but you can detect player's hull number (HULL_*) based on his ducking (FL_DUCKING) state check.

If you would like to know how actually you can use is_hull_vacant() you have to look into the source code of Teleport Smoke Grenade (where this function was originally used).

If you going to read hlsdk_const.inc carefully, you'll see:
Quote:

Originally Posted by hlsdk_const.inc
// The hullnumber paramater of EngFunc_TraceHull, EngFunc_TraceModel and DLLFunc_GetHullBounds
Furthermore how bags is related to player's hull? I'm confused.

SAMURAI16 03-23-2007 14:28

Re: Pallets with Bags
 
with this:
PHP Code:

static hull;
hull pev(idpev_flags) & FL_DUCKING HULL_HEAD HULL_HUMAN 

I can't place anywhere
Or, i think isn't required tracehull on my plugin, and i don't understand how can my code ( if(pev(id,pev_flags) & HULL_HUMAN) ) can works. Only what i want on my plugin, is to check if users isn't aiming at sky, i think its enough only that.
Any suggestions ? how works tracemodel and gethullbounds ?

VEN 03-23-2007 15:05

Re: Pallets with Bags
 
Quote:

Furthermore how bags is related to player's hull?
Quote:

i think isn't required tracehull on my plugin
You get it correct.

Quote:

what i want on my plugin, is to check if users isn't aiming at sky
Just do player aim trace and check if vecEndPos PointContents isn't equal to CONTENTS_SKY.

SAMURAI16 03-23-2007 15:14

Re: Pallets with Bags
 
this is good ?
PHP Code:

static Float:origin1[3];
pev(id,pev_origin,origin1);
static 
ptr;
engfunc(EngFunc_TraceLine,origin1,xorigin,IGNORE_MONSTERS,id,ptr);

static 
Float:vecEndPos[3];
get_tr2(ptr,TR_vecEndPos,vecEndPos)
if(
engfunc(EngFunc_PointContents,vecEndPos) == CONTENTS_SKY)
{
        
client_print(id,print_chat,"[AMXX] You can't place a pallet with bags there");
        return 
PLUGIN_HANDLED;




All times are GMT -4. The time now is 12:25.

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