View Single Post
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 04-14-2013 , 15:47   Re: [TF2] Friendly Mode
Reply With Quote #34

Looks similar to something we have, except we turn people into harmless ponies.
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.

There are some simple things you can do...
Change alpha or render mode of these players, or use a different player model.
Remove their collision.
Prevent sentries from targeting them.
Remove their hitbox.

Even if you make the friendly payers unsolid, they will still collide with, and stand on normal players. Other players will also get stuck in them, so you have to deal with that as well.

If you want to be lazy about it, just use the hidden mvm uber. Its like the normal uber, but it only flashes when you take damage. You still die to map traps, and plugins checking if you are ubered will ignore you... I think.... Then just throw a render mode over them and they should be easily identified.

public OnEntityCreated(building, const String:classname[]) {
if(entity[building] > 0) {
SDKHook(building, SDKHook_Spawn, OnEntitySpawned);
}
}

Wat? Get the classname and hook it if strcontains obj_ = 0

Also, you shouldnt have to reload the map, unless there are some really strange settings going on. Just make sure you hook players on map or plugin start if late loaded, and on plugin end you remove the effect on clients that have the mode on?
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 04-14-2013 at 16:12.
friagram is offline