AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   SetViewEntityBody (https://forums.alliedmods.net/showthread.php?t=287754)

Hanna 09-16-2016 05:09

Re: SetViewEntityBody
 
Update 16/9/16: Release 1.7, bugfixes. Now i started to lookout for attack system. I have 2 ideas currently and one of them is replacing atk system with custom trace, but the way it can be done - with Orpheu. Need some time to think.

Craxor 09-16-2016 22:20

Re: SetViewEntityBody
 
Can you make a special stock if someone is "Female" and i'm "Male" ... in register_touch if i'm touching an female to use your stock and make a baby :o !

Hanna 09-16-2016 23:27

Re: SetViewEntityBody
 
Quote:

Originally Posted by Craxor (Post 2454543)
Can you make a special stock if someone is "Female" and i'm "Male" ... in register_touch if i'm touching an female to use your stock and make a baby :o !

Wtf man, xD. Some kinda of trolling.

joropito 09-19-2016 16:11

Re: SetViewEntityBody
 
Quote:

Originally Posted by Hanna (Post 2454337)
I have 2 ideas currently and one of them is replacing atk system with custom trace, but the way it can be done - with Orpheu. Need some time to think.[/B]

Please expand your idea. Maybe you can get help on that.

Also please upload images and videos.

Hanna 09-20-2016 08:26

Re: SetViewEntityBody
 
Quote:

Originally Posted by joropito (Post 2455309)
Please expand your idea. Maybe you can get help on that.

Also please upload images and videos.

Well, the idea is removing the Execute Ham Primary Attack call from attack forward to apply custom attack.
You want the way? Here, this is i'm currently using and will include it in next update:

Code:

#include <xs>
#include <orpheu>
#include <orpheu_stocks>

new OrpheuFunction:handleApplyMultiDamage;
new OrpheuFunction:handleClearMultiDamage;

public plugin_init()
{
handleApplyMultiDamage = OrpheuGetFunction("ApplyMultiDamage");
handleClearMultiDamage = OrpheuGetFunction("ClearMultiDamage");

RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_glock18", "HamF_Weapon_PrimaryAttack");
}

public HamF_Weapon_PrimaryAttack(iEnt)
{
static id;
id = get_pdata_cbase(iEnt, m_pPlayer, 4);

//Starting now calculate our custom attack
new Float: vecSrc[3], Float: vecForward[3], Float:vecViewOfs[3];

pev(id, pev_origin, vecSrc);
pev(id, pev_view_ofs, vecViewOfs);
xs_vec_add(vecSrc, vecViewOfs, vecSrc);

FireBullets(vecSrc, vecForward, 8192.0, 3, 30.0/*<<<damage*/, id);
return HAM_SUPERCEDE;
}

stock FireBullets(Float:vecSrc[3], Float:vecDir[3], Float:flDistance, iPenetration, Float:flDamage, pevAttacker)
{
new Float:vecEnd[3], Float:vecEndPos[3], Float:vecForward[3];
new tr = create_tr2();
new Float:flFraction, Float:flCurrentDistance;
xs_vec_mul_scalar(vecDir, flDistance, vecForward);
xs_vec_add(vecSrc, vecForward, vecEnd);
while (iPenetration != 0)
{
OrpheuCall(handleClearMultiDamage);

engfunc(EngFunc_TraceLine, vecSrc, vecEnd, DONT_IGNORE_MONSTERS, pevAttacker, tr);
get_tr2(tr, TR_flFraction, flFraction);
if (flFraction != 1.0)
{
new pEntity = get_tr2(tr, TR_pHit);
if (pEntity < 0)
{   
return;
}
iPenetration--;
flCurrentDistance = flFraction * flDistance;
get_tr2(tr, TR_vecEndPos, vecEndPos);
xs_vec_mul_scalar(vecDir, 42.0, vecForward);
xs_vec_add(vecEndPos, vecForward, vecSrc);
flDistance = (flDistance - flCurrentDistance) * 0.75;
xs_vec_mul_scalar(vecDir, flDistance, vecForward);
xs_vec_add(vecSrc, vecForward, vecEnd);
ExecuteHamB(Ham_TraceAttack, pEntity, pevAttacker, flDamage, vecDir, tr, DMG_BULLET | DMG_NEVERGIB);
}
else
{
iPenetration = 0;
}

OrpheuCall(handleApplyMultiDamage, pevAttacker, pevAttacker);
}
}


Also not only this. Ok, later gonna go now.

Hanna 09-20-2016 08:29

Re: SetViewEntityBody
 
Oh, forgot. Maybe if you don't have signatures

Code:

{
    "name"      : "ApplyMultiDamage",
    "library"  : "mod",
    "arguments" :
    [
        {
            "type"  : "entvars_s *",
            "info"  : "pevInflictor"
        },
        {
            "type"  : "entvars_s *",
            "info"  : "pevAttacker"
        }
    ],
    "identifiers":
    [
        {
            "os"    : "windows",
            "mod"  : "cstrike",
            "value" : [0x90,0x8B,0x0D,"*","*","*","*",0x85,0xC9,0x74,"*",0x8B,0x15,"*","*","*","*",0x8B],
            "displacement" : 1
        },
        {
            "os"    : "linux",
            "mod"  : "cstrike",
            "value" : "ApplyMultiDamage__FP9entvars_sT0"
        }
    ]
}

Code:

{
    "name"        : "ClearMultiDamage",
    "library"    : "mod",
    "identifiers" :
    [
        {
            "os"    : "windows",
            "mod"  : "cstrike",
            "value" : [0x90,0x33,0xC0,0xA3,"*","*","*","*",0xA3,"*","*","*","*",0xA3],
            "displacement" : 1
        },
        {
            "os"    : "linux",
            "mod"  : "cstrike",
            "value" : "ClearMultiDamage__Fv"
        }
    ]
}


PRoSToTeM@ 09-24-2016 02:28

Re: SetViewEntityBody
 
@Hanna you can use rg_fire_bullets3 with ReAPI.

HamletEagle 09-24-2016 04:30

Re: SetViewEntityBody
 
Quote:

Originally Posted by PRoSToTeM@ (Post 2456484)
@Hanna you can use rg_fire_bullets3 with ReAPI.

You do realize that this community is primary supporting the official version of hlds, don't you? It's okay to add support for reapi, but IMO plugin should be working in valve's hlds too. It's strange and wrong to have plugins working only on custom dll's.

Hanna 09-25-2016 05:49

Re: SetViewEntityBody
 
And yes, using another libary is breaking the the official licence from Valve.
There is too many pirate servers around and supporting it is not good. IMO.
Using custom library maybe just for testing only purposes.

Celena Luna 10-24-2016 12:48

Re: SetViewEntityBody
 
If I use another weapon plugins which have a model with 2 hands (male and female ofc). Does this plugins actually work with them?


All times are GMT -4. The time now is 06:09.

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