Raised This Month: $68 Target: $400

[CS:S] Any have good idea, parent models to player?

Post New Thread Reply   
Thread Tools Display Modes
Author Message
New Member
Join Date: Sep 2012
Old 07-29-2019 , 10:50   [CS:S] Any have good idea, parent models to player?
Reply With Quote #1

I tried parent entity(with player model) to player.

but, i have problem. (look at picture)

I want to do parent to player. So, i should parent position with GetClientAbsOrigin position.

but, SetParentAttachment don't have respond to GetClientAbsOrigin position.

My Source Code:
float pos[3], angle[3];
GetClientAbsOrigin(client, pos);
GetClientEyeAngles(client, angle);
angle[0] = 0.0;
m_MyCycler[client] = CreateEntityByName("prop_dynamic_override");
DispatchKeyValue(m_MyCycler[client], "model", _ModelName);
DispatchKeyValue(m_MyCycler[client], "spawnflags", "256");
DispatchKeyValue(m_MyCycler[client], "solid", "0");
SetEntPropEnt(m_MyCycler[client], Prop_Send, "m_hOwnerEntity", client);
SetEntityRenderMode(m_MyCycler[client], RENDER_TRANSCOLOR);
//SetEntityRenderColor(m_MyCycler[client], 255, 255, 255, 0);
TeleportEntity(m_MyCycler[client], pos, angle, NULL_VECTOR);
AcceptEntityInput(m_MyCycler[client], "TurnOn", m_MyCycler[client], m_MyCycler[client], 0);
AcceptEntityInput(m_MyCycler[client], "SetParent", client, m_MyCycler[client], 0);

Sorry for my bad English

Last edited by dbscjf1997; 07-29-2019 at 10:54.
dbscjf1997 is offline

Thread Tools
Display Modes

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 11:51.

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