Raised This Month: $ Target: $400
 0% 

if survivors are too far from each other


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Danny_l4d
Senior Member
Join Date: Feb 2010
Old 07-10-2010 , 10:30   if survivors are too far from each other
Reply With Quote #1

Hello all,

The title says it, I am trying to find if people could help with a plugin that prevend people from rushing or no team work....
I am trying to block safe room everything....
but they still are too far apart from each other... now my idea was to if survivor(s) is x distance from each other it can spawn x amount of specials right in front of them/him/her...

is there anyone that can help?

Danny
__________________
Danny_l4d is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 07-10-2010 , 18:42   Re: if survivors are too far from each other
Reply With Quote #2

Get the sourcecode of the smokercloud damage plugin from this forum.

The collisiondetection of the cloudplugin needs the distance of a player from a certain point, so it's basically what you need for your plugin.
Dr. Greg House is offline
Danny_l4d
Senior Member
Join Date: Feb 2010
Old 07-22-2010 , 11:11   Re: if survivors are too far from each other
Reply With Quote #3

problem is I dont know anything about making a script... I can copy/paste and adjust it how I wanted to be.... so I could use some help....
__________________
Danny_l4d is offline
Andersso
Member
Join Date: Nov 2009
Location: E8 2A 2A 2A 2A
Old 07-22-2010 , 13:29   Re: if survivors are too far from each other
Reply With Quote #4

Maybe something like this?

Code:
#include <sourcemod>
#pragma semicolon 1

#define Team_Survivor 2

#define Max_Distance 500

public OnMapStart()
{
    CreateTimer(0.1, Timer_CheckDistance, _, TIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT);
}

public Action:Timer_CheckDistance(Handle:hTimer)
{
    decl Float:fOrigin1[3], Float:fOrigin2[3];
    
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && GetClientTeam(i) == Team_Survivor)
        {
            for (new x = 1; x <= MaxClients; x++)
            {
                if (IsClientInGame(x) && GetClientTeam(x) == Team_Survivor)
                {
                    GetClientAbsOrigin(i, fOrigin1);
                    GetClientAbsOrigin(x, fOrigin2);
                    
                    if (GetVectorDistance(fOrigin1, fOrigin2) >= Max_Distance)
                    {
                        // Oh noes 'i' is too far away from 'x'!
                    }
                }
            }
        }
    }
}

Last edited by Andersso; 07-22-2010 at 13:33.
Andersso is offline
Danny_l4d
Senior Member
Join Date: Feb 2010
Old 07-22-2010 , 22:14   Re: if survivors are too far from each other
Reply With Quote #5

yes a little....
its like this.... say your with 6 players and 2 of them want to rush to the safehouse...
now they have traveled 1500meters they get message "go back to you team mates"
they dont listen and run ahead...
after 2000 meters they get another message "go back to your teammates last warning"
they deny this 1 also... and run along....
and then after 2500 meters BAM!!! 3 hunters 2 boomer spwan right inthere face.... end of story....
I need something like this.... and I know a kind of plugin like this will do good on a lot of servers even the hard 1s...
__________________
Danny_l4d 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 12:50.


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