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

Brushes


Post New Thread Reply   
 
Thread Tools Display Modes
Static2601
Senior Member
Join Date: Jun 2010
Old 12-30-2014 , 20:49   Re: Brushes
Reply With Quote #11

This should work for you. I had to do it by a command since OnMapStart, im guessing, its removed before you spawn, I also tryed OnPluginStart and same thing. You also don't need to SetEntityModel if you have min and max bounds defined and vice versa.
Code:
#define Duck "models/workshop/player/items/pyro/eotl_ducky/eotl_bonus_duck.mdl"

#include <sourcemod>
#include <tf2>
#include <sdktools>
#include <sdkhooks>
#include <morecolors>
#include <halflife>

public Plugin:myinfo =
{
    name = "Spawn Manager",
    description = "",
    author = "Matt",
    version = "1.0",
    url = "http://www.sourcemod.net/"
};
public OnPluginStart()
{
    RegConsoleCmd("sm_hurt", Command_Hurt);
}
public OnMapStart()
{
    PrecacheModel(Duck);
}
public Action:Command_Hurt(client, args)
{
    new entity = CreateEntityByName("trigger_hurt");
    if(entity != -1)
    {
        DispatchKeyValue(entity, "spawnflags", "1");
        DispatchKeyValue(entity, "damage", "99999");
        DispatchKeyValue(entity, "damagecap", "99999");
        DispatchKeyValue(entity, "damagetype", "0");
        
        DispatchSpawn(entity);
        ActivateEntity(entity);
        
        new Float:origin[3]
        origin[0] = 343.0
        origin[1] = -182.0
        origin[2] = 65.0
        TeleportEntity(entity, origin, NULL_VECTOR, NULL_VECTOR); // Teleport trigger_multiple to desired location
        
        SetEntityModel(entity, Duck);
        
        new Float:minbounds[3] = {-100.0, -100.0, 0.0};
        new Float:maxbounds[3] = {100.0, 100.0, 200.0};
        SetEntPropVector(entity, Prop_Send, "m_vecMins", minbounds); // Set the size of the trigger
        SetEntPropVector(entity, Prop_Send, "m_vecMaxs", maxbounds);
        
        //SetEntProp(entity, Prop_Send, "m_nSolidType", 2);
       // SetEntProp(entity, Prop_Send, "m_fEffects", GetEntProp(entity, Prop_Send, "m_fEffects") | 32);
        
        SetEntProp(entity, Prop_Send, "m_nSolidType", 2);

        new enteffects = GetEntProp(entity, Prop_Send, "m_fEffects");
        enteffects |= 32;
        SetEntProp(entity, Prop_Send, "m_fEffects", enteffects); 
        
        //SDKHook(entity, SDKHook_StartTouch, Hook_StartTouch);
        //SDKHook(entity, SDKHook_EndTouch, Hook_EndTouch);
       // SDKHook(entity, SDKHook_Touch, Hook_Touch);
    }
    return Plugin_Handled;
}
Static2601 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 01:01.


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