Raised This Month: $51 Target: $400
 12% 

[L4D & L4D2] Left 4 DHooks Direct (1.146) [21-Apr-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 02-08-2024 , 20:37   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1051

Quote:
Originally Posted by bullet28 View Post
It isn't. However, the function name is 'IsPositionInSaferoom', not 'IsPositionOnCheckpointNav,' right? I mean, that's not the expected behavior. In reallity I was standing in the saferoom.
The way the game detects whether something/someone is in saferoom is via nav. Navigation is how you detect saferooms unless you hardcode the coordinates which is an ugly ugly way to do it.

I will let Silver respond, but in my opinion that's an error with the map not the native.
__________________
Spirit_12 is offline
Machine
Senior Member
Join Date: Apr 2010
Old 02-09-2024 , 08:00   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1052

Quote:
Originally Posted by bullet28 View Post
It isn't. However, the function name is 'IsPositionInSaferoom', not 'IsPositionOnCheckpointNav,' right? I mean, that's not the expected behavior. In reallity I was standing in the saferoom.
The original method Silvers implemented for IsInLastCheckpoint that is commented out in the files worked perfectly for the standard maps and from my understanding was changed because of an error with a custom map. You can uncomment it to fix your problem, to do this you might need to find older version of this plugin to compare. With this new method, there is also a problem under the overpass in the middle of c9m1 and I have to change to old method myself every time there is an update.
Machine is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-10-2024 , 07:44   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1053

Quote:
Originally Posted by Machine View Post
The original method Silvers implemented for IsInLastCheckpoint that is commented out in the files worked perfectly for the standard maps and from my understanding was changed because of an error with a custom map. You can uncomment it to fix your problem, to do this you might need to find older version of this plugin to compare. With this new method, there is also a problem under the overpass in the middle of c9m1 and I have to change to old method myself every time there is an update.
Will add a bool to the native such as "bool nav = true" and set "true" to use nav area method and false for SDKCall method which I'll implement again. Then you could call both to test, if either are true then they're in saferoom, maybe. I don't remember if SDKCall method gave false positives or not.

Alternatively I could implement another native that checks by using the "info_changelevel" entity mins/maxs - the same method that "Transition Level Fix" plugin I wrote is using. That might be the most accurate. Don't have time to add these now, might be a few weeks.
__________________
Silvers is offline
Machine
Senior Member
Join Date: Apr 2010
Old 02-11-2024 , 03:01   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1054

Thank you Silvers.
Machine is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 02-13-2024 , 15:16   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1055

"ServerAddr" doesn't seem to work on Windows (L4D2).
Nevermind, works fine.
__________________

Last edited by claudiuhks; 02-13-2024 at 16:05.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
zonbarbar
Member
Join Date: Jul 2022
Old 02-14-2024 , 09:55   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1056

how to ues L4D_MolotovPrj to create grenade and throw it like i use a grenade?
i use this, it's just creating on my face and hit right down on the ground
i dont know how to send code

code:
float vPos[3], vAng[3], vecVel[3];
GetClientEyeAngles(client, vAng)
GetClientEyePosition(client, vPos);
vecVel[0] = 0.0;
vecVel[1] = 0.0;
vecVel[2] = 360.0;
L4D_MolotovPrj(1, vPos, vAng, vecVel);

Last edited by zonbarbar; 02-14-2024 at 09:56.
zonbarbar is online now
little_froy
Senior Member
Join Date: May 2021
Old 02-14-2024 , 10:30   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1057

Quote:
Originally Posted by zonbarbar View Post
how to ues L4D_MolotovPrj to create grenade and throw it like i use a grenade?
i use this, it's just creating on my face and hit right down on the ground
i dont know how to send code

code:
float vPos[3], vAng[3], vecVel[3];
GetClientEyeAngles(client, vAng)
GetClientEyePosition(client, vPos);
vecVel[0] = 0.0;
vecVel[1] = 0.0;
vecVel[2] = 360.0;
L4D_MolotovPrj(1, vPos, vAng, vecVel);
these code works, note, the "SCALE" defines the force of flying, replace it to you want
Code:
        float eye_pos[3];
        float eye_ang[3];
        float ang_fwd[3];
        GetClientEyePosition(client, eye_pos);
        GetClientEyeAngles(client, eye_ang);
        GetAngleVectors(eye_ang, ang_fwd, NULL_VECTOR, NULL_VECTOR);
        NormalizeVector(ang_fwd, ang_fwd);
        ScaleVector(ang_fwd, SCALE);
        L4D_MolotovPrj(client, eye_pos, eye_ang, ang_fwd);

Last edited by little_froy; 02-14-2024 at 10:31.
little_froy is online now
zonbarbar
Member
Join Date: Jul 2022
Old 02-14-2024 , 10:45   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1058

Quote:
Originally Posted by little_froy View Post
these code works, note, the "SCALE" defines the force of flying, replace it to you want
Code:
        float eye_pos[3];
        float eye_ang[3];
        float ang_fwd[3];
        GetClientEyePosition(client, eye_pos);
        GetClientEyeAngles(client, eye_ang);
        GetAngleVectors(eye_ang, ang_fwd, NULL_VECTOR, NULL_VECTOR);
        NormalizeVector(ang_fwd, ang_fwd);
        ScaleVector(ang_fwd, SCALE);
        L4D_MolotovPrj(client, eye_pos, eye_ang, ang_fwd);
tk i will try it
zonbarbar is online now
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-14-2024 , 13:41   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1059

Quote:
Originally Posted by zonbarbar View Post
how to ues L4D_MolotovPrj to create grenade and throw it like i use a grenade?
The test plugin has examples to show this, how to set grenade velocity, and how to use other natives. Suggest looking in there if you're stuck on usage.
__________________
Silvers is offline
zonbarbar
Member
Join Date: Jul 2022
Old 02-15-2024 , 00:37   Re: [L4D & L4D2] Left 4 DHooks Direct (1.143) [25-Jan-2024]
Reply With Quote #1060

float vPos[3];
float vAng[3];
float vVel[3];
float vRot[3];

GetClientEyeAngles(client, vAng);
GetClientEyePosition(client, vPos);
vPos[2] -= 5.0;

// Set velocity
GetAngleVectors(vAng, vVel, NULL_VECTOR, NULL_VECTOR);
NormalizeVector(vVel, vVel);
ScaleVector(vVel, 1000.0); // Scale to ~ 250+ for projectiles other than the Grenade Launcher

// Random spin
vRot[0] = GetRandomFloat(300.0, 500.0);
vRot[1] = GetRandomFloat(300.0, 500.0);
vRot[2] = GetRandomFloat(-500.0, 500.0);

// int entity = L4D_PipeBombPrj(client, vPos, vAng, true, vVel, vRot); // With particles
// int entity = L4D_PipeBombPrj(client, vPos, vAng, false); // Without particles
// int entity = L4D_PipeBombPrj(client, vPos, vAng, true, vVel, vRot);
int entity = L4D_MolotovPrj(client, vPos, vAng, vVel, vRot);
// int entity = L4D2_VomitJarPrj(client, vPos, vAng, vVel, vRot);
// int entity = L4D2_SpitterPrj(client, vPos, vAng, vVel, vRot);
// int entity = L4D2_GrenadeLauncherPrj(client, vPos, vAng, vVel, vRot);

L4D_RemoveEntityDelay(entity, 5.0);
// */

return Plugin_Handled;
yes i copy the test plugin code and set scale to 10000, things happen
zonbarbar is online now
Reply



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 08:24.


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