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

Problem with prop_ragdoll


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 08-04-2018 , 16:15   Problem with prop_ragdoll
Reply With Quote #1

hello guys im actually trying to create a prop_ragdoll and to set velocity on it on spawn but something weird happen instead, here is the code:
Code:
void CreateRagdoll(float ori[3])
{
    int dynamic = CreateEntityByName("prop_ragdoll");
    DispatchKeyValue(dynamic, "model", "models/player/demo.mdl");
    //DispatchKeyValue(dynamic, "spawnflags", "4");
    DispatchKeyValue(dynamic, "skin", "0");
    ActivateEntity(dynamic);
    DispatchSpawn(dynamic);
    float vel[3];
    vel[0] = GetRandomFloat(300.0, 400.0);
    vel[1] = GetRandomFloat(300.0, 400.0);
    vel[2] = GetRandomFloat(3000.0, 4000.0);
    TeleportEntity(dynamic, ori, NULL_VECTOR, vel);
}

Here the prop spawn with no velocity and when I jump on it I receive this velocity.
__________________
My Steam I take private requests if related with TF2
My Plugins

Last edited by Facksy; 08-04-2018 at 16:17.
Facksy is offline
 



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 07:41.


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