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

Dissolve (player ragdolls)


Post New Thread Reply   
 
Thread Tools Display Modes
franzcis066
Member
Join Date: Nov 2007
Old 06-13-2008 , 03:23   Re: Dissolve (player ragdolls)
Reply With Quote #31

Quote:
Originally Posted by Box Cutter View Post
I would love for it to work on my CSSDM server but if it won't without deleteing or modding any files then I am not going to mess with it.

-BC
If you want it to work, Change the delay to 0 and the type to 3.. It has a nice effect.. I dont know If the dissolver will catch up with CSSDM..
franzcis066 is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 06-13-2008 , 11:11   Re: Dissolve (player ragdolls)
Reply With Quote #32

Pretty sure that CSSDM removes ragdolls the instant you die, so it probably won't work with CSSDM.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 06-13-2008 , 12:34   Re: Dissolve (player ragdolls)
Reply With Quote #33

Quote:
Originally Posted by Box Cutter View Post
I would love for it to work on my CSSDM server but if it won't without deleteing or modding any files then I am not going to mess with it.

-BC
i think cssdm removes ragdolls when you are killed so it probably wont work with cssdm
__________________
FunTF2Server is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 06-13-2008 , 19:12   Re: Dissolve (player ragdolls)
Reply With Quote #34

I don't have cssdm and the bodies don't dissolve, they simply dissapear on my tf2 server.
Cooltad is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 06-14-2008 , 01:56   Re: Dissolve (player ragdolls)
Reply With Quote #35

Do you have an instant respawn or fast respawn plugin installed?
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
Kigen
BANNED
Join Date: Feb 2008
Old 06-14-2008 , 04:58   Re: Dissolve (player ragdolls)
Reply With Quote #36

I think the retrival of the ragdoll id should be moved to when the player dies.

In fact I've already done that for 3rd MD. I built a special plugin for their drills and it respawns people faster than it makes their bodies disappear. So I retrieved the rag doll ID first, put it in the field for the timer. Made a simple IsValidEdict check in the timer then removed the body if the IsValidEdict passed.

Code:
public EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
	if ( Respawn )
	{
		new client = GetClientOfUserId(GetEventInt(event, "userid"));
		if ( client && IsClientInGame(client) )
		{
			CreateTimer(10.0, RespawnTimer, client, TIMER_FLAG_NO_MAPCHANGE);
			new ragdoll = GetEntPropEnt(client, Prop_Send, "m_hRagdoll");
			if (ragdoll<0)
				return;
			CreateTimer(120.0, Dissolve, ragdoll, TIMER_FLAG_NO_MAPCHANGE);
		}
	}
}

public Action:RespawnTimer(Handle:timer, any:client)
{
	if ( Respawn && client && IsClientInGame(client) && !IsPlayerAlive(client) )
		CS_RespawnPlayer(client);
	return Plugin_Stop;
}

public Action:Dissolve(Handle:timer, any:ragdoll)
{
	if ( IsValidEntity(ragdoll) )
	{
		new String:dname[32], String:dtype[32];
		Format(dname, sizeof(dname), "dis_%d", ragdoll);
		Format(dtype, sizeof(dtype), "%d", 0);
  
		new ent = CreateEntityByName("env_entity_dissolver");
		if (ent>0)
		{
			DispatchKeyValue(ragdoll, "targetname", dname);
			DispatchKeyValue(ent, "dissolvetype", dtype);
			DispatchKeyValue(ent, "target", dname);
			AcceptEntityInput(ent, "Dissolve");
			AcceptEntityInput(ent, "kill");
		}
	}
	return Plugin_Stop;
}
Kigen is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 06-14-2008 , 22:01   Re: Dissolve (player ragdolls)
Reply With Quote #37

Quote:
Do you have an instant respawn or fast respawn plugin installed?
TF2: Respawn System, yeah.
Is there a fix?
Cooltad is offline
crazychicken
Senior Member
Join Date: Mar 2008
Old 06-22-2008 , 21:59   Re: Dissolve (player ragdolls)
Reply With Quote #38

nice work
__________________
crazychicken is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 07-03-2008 , 17:11   Re: Dissolve (player ragdolls)
Reply With Quote #39

Is it possible to make this plugin CSSDM compatible?
exvel is offline
Send a message via ICQ to exvel
Cooltad
Veteran Member
Join Date: Apr 2008
Old 07-03-2008 , 17:55   Re: Dissolve (player ragdolls)
Reply With Quote #40

Quote:
Originally Posted by Kigen View Post
I think the retrival of the ragdoll id should be moved to when the player dies.

In fact I've already done that for 3rd MD. I built a special plugin for their drills and it respawns people faster than it makes their bodies disappear. So I retrieved the rag doll ID first, put it in the field for the timer. Made a simple IsValidEdict check in the timer then removed the body if the IsValidEdict passed.

Code:
public EventPlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    if ( Respawn )
    {
        new client = GetClientOfUserId(GetEventInt(event, "userid"));
        if ( client && IsClientInGame(client) )
        {
            CreateTimer(10.0, RespawnTimer, client, TIMER_FLAG_NO_MAPCHANGE);
            new ragdoll = GetEntPropEnt(client, Prop_Send, "m_hRagdoll");
            if (ragdoll<0)
                return;
            CreateTimer(120.0, Dissolve, ragdoll, TIMER_FLAG_NO_MAPCHANGE);
        }
    }
}

public Action:RespawnTimer(Handle:timer, any:client)
{
    if ( Respawn && client && IsClientInGame(client) && !IsPlayerAlive(client) )
        CS_RespawnPlayer(client);
    return Plugin_Stop;
}

public Action:Dissolve(Handle:timer, any:ragdoll)
{
    if ( IsValidEntity(ragdoll) )
    {
        new String:dname[32], String:dtype[32];
        Format(dname, sizeof(dname), "dis_%d", ragdoll);
        Format(dtype, sizeof(dtype), "%d", 0);
  
        new ent = CreateEntityByName("env_entity_dissolver");
        if (ent>0)
        {
            DispatchKeyValue(ragdoll, "targetname", dname);
            DispatchKeyValue(ent, "dissolvetype", dtype);
            DispatchKeyValue(ent, "target", dname);
            AcceptEntityInput(ent, "Dissolve");
            AcceptEntityInput(ent, "kill");
        }
    }
    return Plugin_Stop;
}
So this will make it work with faster respawns?
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad 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 23:18.


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