Raised This Month: $ Target: $400
 0% 

(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-28-2019 , 00:08   Re: (L4D2)Plugin request! Help! I always wondered if the special zombio
Reply With Quote #1

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


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