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

(L4D2)Plugin request! Help! I always wondered if the special zombio


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
login101
Senior Member
Join Date: Sep 2017
Old 11-24-2019 , 02:21   (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #1

Bot Special zombies Can you make it to the Survivor Arrival Point Safe Door?



Please let the bot zombie open the door. Can I add it?

I'm weak in English .. I'm sorry


ai Special zombies Please open the door!


Special zombie
Let me open the door to the survivor's safety.
Attached Files
File Type: sp Get Plugin or Get Source (unsaferoomdoor.sp - 188 views - 1.9 KB)

Last edited by login101; 11-24-2019 at 02:28.
login101 is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 11-25-2019 , 23:55   Re: (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #2

Try this

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>

#define CoolDown 0.5
#define MAXDISTANCE 60.0

float g_flTime[MAXPLAYERS 1];

public 
void OnMapEnd()
{
    for (
int i 1<= MaxClientsi++)
        
g_flTime[i] = 0.0;
}

public 
Action OnPlayerRunCmd(int clientint &buttons)
{
    if (
GetClientTeam(client) != || !IsPlayerAlive(client) || !(buttons IN_ATTACK2) || GetGameTime() - g_flTime[client] < CoolDown)
        return;
        
    
int iTarget GetClientAimTarget(clientfalse);
    
    if (
iTarget <= MaxClients || GetDistance(clientiTarget) > MAXDISTANCE)
        return;
        
    
char szName[56];
    
GetEntityClassname(iTargetszNamesizeof szName);
    
    if (
StrContains(szName"prop_door_rotating") != -1)
        
AcceptEntityInput(iTarget"Toggle");
        
    
g_flTime[client] = GetGameTime();
}

float GetDistance(int a1int a2)
{
    
float vOrigin[3], vPos[3];
    
    
GetClientEyePosition(a1vOrigin);
    
GetEntPropVector(a2Prop_Send"m_vecOrigin"vPos);
    
    return 
GetVectorDistance(vOriginvPos);

__________________
cry
BHaType is offline
Send a message via AIM to BHaType
login101
Senior Member
Join Date: Sep 2017
Old 11-27-2019 , 09:13   Re: (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #3

Quote:
Originally Posted by BHaType View Post
Try this

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>

#define CoolDown 0.5
#define MAXDISTANCE 60.0

float g_flTime[MAXPLAYERS 1];

public 
void OnMapEnd()
{
    for (
int i 1<= MaxClientsi++)
        
g_flTime[i] = 0.0;
}

public 
Action OnPlayerRunCmd(int clientint &buttons)
{
    if (
GetClientTeam(client) != || !IsPlayerAlive(client) || !(buttons IN_ATTACK2) || GetGameTime() - g_flTime[client] < CoolDown)
        return;
        
    
int iTarget GetClientAimTarget(clientfalse);
    
    if (
iTarget <= MaxClients || GetDistance(clientiTarget) > MAXDISTANCE)
        return;
        
    
char szName[56];
    
GetEntityClassname(iTargetszNamesizeof szName);
    
    if (
StrContains(szName"prop_door_rotating") != -1)
        
AcceptEntityInput(iTarget"Toggle");
        
    
g_flTime[client] = GetGameTime();
}

float GetDistance(int a1int a2)
{
    
float vOrigin[3], vPos[3];
    
    
GetClientEyePosition(a1vOrigin);
    
GetEntPropVector(a2Prop_Send"m_vecOrigin"vPos);
    
    return 
GetVectorDistance(vOriginvPos);

Thank you very much for your help. Um ... Is it possible to open only closed doors? Only open locked doors Open only closed doors


ai I want to open only closed doors.

Last edited by login101; 11-27-2019 at 09:14.
login101 is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 11-27-2019 , 20:30   Re: (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #4

PHP Code:
#pragma semicolon 1 
#pragma newdecls required 

#include <sourcemod> 
#include <sdktools> 

#define CoolDown 0.5 
#define MAXDISTANCE 60.0 

float g_flTime[MAXPLAYERS 1]; 

public 
void OnMapEnd() 

    for (
int i 1<= MaxClientsi++) 
        
g_flTime[i] = 0.0


public 
Action OnPlayerRunCmd(int clientint &buttons

    if (
GetClientTeam(client) != || !IsPlayerAlive(client) || !(buttons IN_ATTACK2) || GetGameTime() - g_flTime[client] < CoolDown
        return; 
         
    
int iTarget GetClientAimTarget(clientfalse); 
     
    if (
iTarget <= MaxClients || GetDistance(clientiTarget) > MAXDISTANCE
        return; 
         
    
char szName[56]; 
    
GetEntityClassname(iTargetszNamesizeof szName); 
     
    if (
StrContains(szName"prop_door_rotating") != -1
        
AcceptEntityInput(iTarget"Open"); 
         
    
g_flTime[client] = GetGameTime(); 


float GetDistance(int a1int a2

    
float vOrigin[3], vPos[3]; 
     
    
GetClientEyePosition(a1vOrigin); 
    
GetEntPropVector(a2Prop_Send"m_vecOrigin"vPos); 
     
    return 
GetVectorDistance(vOriginvPos); 

__________________
cry
BHaType is offline
Send a message via AIM to BHaType
login101
Senior Member
Join Date: Sep 2017
Old 11-27-2019 , 23:26   Re: (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #5

Quote:
Originally Posted by BHaType View Post
PHP Code:
#pragma semicolon 1 
#pragma newdecls required 

#include <sourcemod> 
#include <sdktools> 

#define CoolDown 0.5 
#define MAXDISTANCE 60.0 

float g_flTime[MAXPLAYERS 1]; 

public 
void OnMapEnd() 

    for (
int i 1<= MaxClientsi++) 
        
g_flTime[i] = 0.0


public 
Action OnPlayerRunCmd(int clientint &buttons

    if (
GetClientTeam(client) != || !IsPlayerAlive(client) || !(buttons IN_ATTACK2) || GetGameTime() - g_flTime[client] < CoolDown
        return; 
         
    
int iTarget GetClientAimTarget(clientfalse); 
     
    if (
iTarget <= MaxClients || GetDistance(clientiTarget) > MAXDISTANCE
        return; 
         
    
char szName[56]; 
    
GetEntityClassname(iTargetszNamesizeof szName); 
     
    if (
StrContains(szName"prop_door_rotating") != -1
        
AcceptEntityInput(iTarget"Open"); 
         
    
g_flTime[client] = GetGameTime(); 


float GetDistance(int a1int a2

    
float vOrigin[3], vPos[3]; 
     
    
GetClientEyePosition(a1vOrigin); 
    
GetEntPropVector(a2Prop_Send"m_vecOrigin"vPos); 
     
    return 
GetVectorDistance(vOriginvPos); 


thank you!!! You are an angel
login101 is offline
login101
Senior Member
Join Date: Sep 2017
Old 11-28-2019 , 00:08   Re: (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #6

Quote:
Originally Posted by BHaType View Post
PHP Code:
#pragma semicolon 1 
#pragma newdecls required 

#include <sourcemod> 
#include <sdktools> 

#define CoolDown 0.5 
#define MAXDISTANCE 60.0 

float g_flTime[MAXPLAYERS 1]; 

public 
void OnMapEnd() 

    for (
int i 1<= MaxClientsi++) 
        
g_flTime[i] = 0.0


public 
Action OnPlayerRunCmd(int clientint &buttons

    if (
GetClientTeam(client) != || !IsPlayerAlive(client) || !(buttons IN_ATTACK2) || GetGameTime() - g_flTime[client] < CoolDown
        return; 
         
    
int iTarget GetClientAimTarget(clientfalse); 
     
    if (
iTarget <= MaxClients || GetDistance(clientiTarget) > MAXDISTANCE
        return; 
         
    
char szName[56]; 
    
GetEntityClassname(iTargetszNamesizeof szName); 
     
    if (
StrContains(szName"prop_door_rotating") != -1
        
AcceptEntityInput(iTarget"Open"); 
         
    
g_flTime[client] = GetGameTime(); 


float GetDistance(int a1int a2

    
float vOrigin[3], vPos[3]; 
     
    
GetClientEyePosition(a1vOrigin); 
    
GetEntPropVector(a2Prop_Send"m_vecOrigin"vPos); 
     
    return 
GetVectorDistance(vOriginvPos); 

Can I add a tank? ㅇㅅㅇ
login101 is offline
login101
Senior Member
Join Date: Sep 2017
Old 11-28-2019 , 01:19   Re: (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #7

Quote:
Originally Posted by BHaType View Post
Try this

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdktools>

#define CoolDown 0.5
#define MAXDISTANCE 60.0

float g_flTime[MAXPLAYERS 1];

public 
void OnMapEnd()
{
    for (
int i 1<= MaxClientsi++)
        
g_flTime[i] = 0.0;
}

public 
Action OnPlayerRunCmd(int clientint &buttons)
{
    if (
GetClientTeam(client) != || !IsPlayerAlive(client) || !(buttons IN_ATTACK2) || GetGameTime() - g_flTime[client] < CoolDown)
        return;
        
    
int iTarget GetClientAimTarget(clientfalse);
    
    if (
iTarget <= MaxClients || GetDistance(clientiTarget) > MAXDISTANCE)
        return;
        
    
char szName[56];
    
GetEntityClassname(iTargetszNamesizeof szName);
    
    if (
StrContains(szName"prop_door_rotating") != -1)
        
AcceptEntityInput(iTarget"Toggle");
        
    
g_flTime[client] = GetGameTime();
}

float GetDistance(int a1int a2)
{
    
float vOrigin[3], vPos[3];
    
    
GetClientEyePosition(a1vOrigin);
    
GetEntPropVector(a2Prop_Send"m_vecOrigin"vPos);
    
    return 
GetVectorDistance(vOriginvPos);

The multiple rock plugins you shared are really fun !!
Applied to my tank !! 047 ~ 06:55
https://youtu.be/qnwum3K8i0g



ThanksThanksThanksThanksThanksThanksThanks

Last edited by login101; 11-28-2019 at 01:21.
login101 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 16:44.


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