Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 #5

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
 



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 04:55.


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