AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Model attachment question (https://forums.alliedmods.net/showthread.php?t=164121)

RIKUSYO 08-07-2011 13:39

[HELP] Model attachment question
 
I'm testing attach model to player.
but visible only shadow.
I need help.

[IMG]http://img838.**************/img838/5549/helplz.jpg[/IMG]

Uploaded with **************

Code:

#define MDL_TEST "models/headcrabclassic.mdl"

new ent = CreateEntityByName("prop_dynamic");
if ( IsValidEdict( ent ) )
{
    new String:tName[32];
   
    GetEntPropString(client, Prop_Data, "m_iName", tName, sizeof( tName ) );
    DispatchKeyValue(ent,    "targetname",    "head_ent");
    DispatchKeyValue(ent,    "parentname",    tName);
    SetEntPropEnt(ent, Prop_Send, "m_hOwnerEntity", client );
    SetEntityModel( ent, MDL_TEST );
    DispatchSpawn( ent );
    SetVariantString( "!activator" );
    AcceptEntityInput(ent, "SetParent",                client, ent, 0);
    SetVariantString( "head" );
    AcceptEntityInput(ent, "SetParentAttachment",    client, ent, 0);
}


Flipper_SPb 08-07-2011 13:43

Re: [HELP] Model attachment question
 
Wrong section. Post this here http://forums.alliedmods.net/forumdisplay.php?f=107

RIKUSYO 08-07-2011 13:44

Re: [HELP] Model attachment question
 
Oh. I'm wrong section. :cry:
this question for sourcemod.


All times are GMT -4. The time now is 03:22.

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