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

Left 4 Dead 2, Sourcemod, setparent bones for survivors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mozilla_Firefox
Junior Member
Join Date: Jan 2018
Old 11-20-2018 , 23:59   Left 4 Dead 2, Sourcemod, setparent bones for survivors
Reply With Quote #1

Hello! Could you help me? I am trying to restore the Smod plugin DeathChaos25, where he parented his legs with the world player model. He set "bleedout". Tell me - how can you parenting the legs to the center of the model without rotating the yaw angle and rotating it while the character is moving.

P.S. "!activator" - its bad idea. I can't turn off yaw angle rotation.
P.S.S. Sorry for bad english :крик:

Code:

decl Float:vAngles[3];
decl Float:vOrigin[3];
GetClientAbsOrigin(client, vOrigin);
GetClientAbsAngles(client, vAngles);
decl String:playerModel[128];
GetEntPropString(client, Prop_Data, "m_ModelName", playerModel, sizeof(playerModel));

new clone = CreateEntityByName("prop_dynamic_override");
SetEntityModel(clone, playerModel);

SetEntProp(clone, Prop_Data, "m_CollisionGroup", 2);
decl String:sTemp[16];
Format(sTemp, sizeof(sTemp), "target%d", client);
DispatchKeyValue(client, "targetname", sTemp);
SetVariantString(sTemp);
AcceptEntityInput(clone, "SetParent", clone, clone, 0);

SetVariantString("bleedout"); //pistol legL
AcceptEntityInput(clone, "SetParentAttachment");

//TeleportEntity(clone, vOrigin, vAngles, NULL_VECTOR);
SetEntPropFloat(clone, Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate"));
SetEntData(clone, PropOff_nSequence, sequence);

//SetEntProp(client, Prop_Send, "m_bDrawViewmodel", 0);
//SetEntityRenderMode(client, RENDER_NONE);
CloneModel[client] = clone;
//ang -80 0 -90
//pos -10 -40 -20
new Float:pos[3], Float:ang[3];
ang[0] = -0.0;
ang[1] = 90.0;
ang[2] = -90.0;

pos[0] = -10.0;
pos[1] = -40.0;
pos[2] = -20.0;
TeleportEntity(CloneModel[client], pos, ang, NULL_VECTOR);
Mozilla_Firefox is offline
Mozilla_Firefox
Junior Member
Join Date: Jan 2018
Old 11-21-2018 , 02:40   Re: Left 4 Dead 2, Sourcemod, setparent bones for survivors
Reply With Quote #2

If you tell me all parent bones - its would be great! Thx
Mozilla_Firefox is offline
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:14.


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