AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FakeMeda and TS help (https://forums.alliedmods.net/showthread.php?t=61207)

Styles 09-23-2007 23:51

FakeMeda and TS help
 
How can I check if a user is lying down in the specialist.

Code:

if ( (pev(id,pev_button) & IN_LAYINGPOSITION??))
{
                client_print(id, print_chat, "My Text")
                return PLUGIN_HANDLED
}

now IN_LAYINGPOSITION is not real do they have one? I looked and couldn't find them.

Wilson [29th ID] 09-24-2007 03:10

Re: FakeMeda and TS help
 
No, it's not real, and you won't find it that way.

In dod, the value is inside pev_iuser3. If he's proned (laying), it's 1 - if not, it's 0.

You can try searching the forums for ts laying or ts prone or ts stocks to find if anyone has already made something to solve this. If the stock doesn't exist, you can figure out which pev value it is by using FakeMeta Tools (in the plugins forum) and test each of the iuser and fuser values. Shouldn't be too hard.

Styles 09-24-2007 13:57

Re: FakeMeda and TS help
 
So your saying do something like:

Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
        register_forward(FM_PlayerPreThink, "forward_prethink");
}

public forward_prethink(id)
{
        client_print(id, print_chat, "[AMXX] The action is %s", pev(id, pev_iuser3))
}

yeah I know I could have made something like /checkaction or some bs but I would rather it spam so I can see every second whats going on.

But yeah something like that and let it print out what that is and what its doing?

I'm just now starting to use FakeMeta and Engine Commands like velocity so I'm trying to learn as much and have as much fun with it as possible.

Wilson [29th ID] 09-24-2007 15:04

Re: FakeMeda and TS help
 
Yes, that's correct. Or you can use a global 33set variable and only echo it when it changes for that client.

if pronestate != g_pronestate[id] { echo..

Styles 09-24-2007 19:05

Re: FakeMeda and TS help
 
it only returns 0 :- (

Wilson [29th ID] 09-24-2007 20:54

Re: FakeMeda and TS help
 
That's because it probably doesn't use the same variable as DoD. Try different variables...iuser1 through 4...fuser1 through 4, etc.


Worst comes to worst, you can check pev_size. It is smaller when proned.

Charr 09-26-2007 13:04

Re: FakeMeda and TS help
 
Check for their animation. If they are prone, they will be in their animation.

Wilson [29th ID] 09-26-2007 16:09

Re: FakeMeda and TS help
 
That provides problems because there are more than one animation for that. There is "going prone," "proned," "prone crawling," "prone getting up," etc.

It's a lot simpler to check the size, which is consistent whenever they are proned.

Charr 09-26-2007 16:21

Re: FakeMeda and TS help
 
It would work for TS, since there is no going prone, crawling or getting up animations, there is only diving which is also used for laying on the ground.

Greenberet 09-27-2007 05:07

Re: FakeMeda and TS help
 
but there is also rolling


All times are GMT -4. The time now is 16:15.

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