View Single Post
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-14-2013 , 18:23   Re: [TF2] Friendly Mode
Reply With Quote #36

Quote:
Originally Posted by friagram View Post
Unfortunately plugins like rtd do not provide natives to disable the takedamage, rolls, etc.
You can provide your own and build them into these other plugins, which is what will end up having to be done in the end if you want everything to work smoothly with these types of plugins... To prevent them from rolling, check if they are immune, block them from dealing damage via goomba stomps, etc.
I figured as much. Including THAT extreme measure of compatibility with other plugins is not a main goal at this time though.
Quote:
Originally Posted by friagram View Post
Change alpha or render mode of these players, or use a different player model.
I was thinking some sort of particle effect that follows the player, similar to the slight glow provided by sm_spyvision or the glow that appears when a player rolls the RTD effect Scary Bullets. I don't want to interfere other plugins that change alpha, change models, etc.
Quote:
Originally Posted by friagram View Post
Remove their collision. Remove their hitbox.
That's my next priority; I have a feeling that it's going to be more difficult than anything else so far was.
Quote:
Originally Posted by friagram View Post
Prevent sentries from targeting them.
Already done, that was included in the original version posted by Dyl0n.
Quote:
Originally Posted by friagram View Post
Just make sure you hook players on plugin start if late loaded, and on plugin end you remove the effect on clients that have the mode on?
Right now they are hooked upon joining the server, I believe. Would I just be able to duplicate that to OnPluginStart?

Change this:
Code:
public OnClientPutInServer(client)
{
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
	SDKHook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);
}
To this?:
Code:
public OnPluginStart(client)
{
	[OTHER STUFF THAT HAPPENS OnPluginStart]
	HookNewClient(client);
}

public OnClientPutInServer(client)
{
	HookNewClient(client);
}

public OnPluginEnd(client)
{
	if (ClientIsFriendly[client]) {
		MakeClientHostile(client);
	}
}

HookNewClient(const client) {
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
	SDKHook(client, SDKHook_WeaponSwitch, OnWeaponSwitch);
}
Again, keep in mind that I've only been using SourcePawn for 3 days, lol.

Last edited by ddhoward; 04-14-2013 at 19:47.
ddhoward is offline