View Single Post
Author Message
scorpius2k1
Senior Member
Join Date: Feb 2016
Old 03-05-2018 , 10:44   Set an entities gravity
Reply With Quote #1

Is there a way to set a "prop_physics" gravity? I am able to easily set a client's gravity with "SetEntityGravity", but this is not working for other types of props within the game. Here is the code I am using:

PHP Code:
stock CreateProp(Float:Origin[3])
{
    
iProp CreateEntityByName("prop_physics");
    if(
IsValidEntity(iProp))
    {
        
DispatchKeyValue(iProp"model""models/props_wasteland/prison_toilet01.mdl");
        
DispatchSpawn(iProp);

        
SetEntityGravity(iProp4.0); // NOT WORKING

        
TeleportEntity(iPropOriginNULL_VECTORNULL_VECTOR);
    }

Thanks in advance!
__________________
{__ PIRATES COVE __} ● HIGH-KILL Community | Stats ●
Half-Life 2: Deathmatch
66.151.244.149:27016 => CONNECT

Last edited by scorpius2k1; 03-05-2018 at 10:45.
scorpius2k1 is offline