Raised This Month: $ Target: $400
 0% 

[TF2] Events on player capture point


Post New Thread Reply   
 
Thread Tools Display Modes
xerox_i_
Member
Join Date: Mar 2013
Old 12-22-2013 , 11:59   Re: [TF2] Events on player capture point
Reply With Quote #11

@GsiX yah but i rly want to know how to put events on things into maps and gamemodes this is my 1st plugin!

Last edited by xerox_i_; 12-22-2013 at 11:59.
xerox_i_ is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-22-2013 , 12:22   Re: [TF2] Events on player capture point
Reply With Quote #12

Sorry i have no clue on TF2.. this is blind reply..

PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <tf2>

new const String:CapType[5][32] =
{
    
"team_control_point_master",
    
"team_control_point",
    
"trigger_capture_area",
    
"item_teamflag",
    
"func_capturezone"
}

public 
Plugin:myinfo 
{
    
name "Anti Point Capture",
    
author "XeroX",
    
description "",
    
version "1.0",
    
url "www.sourcemod.net"
}

public 
OnPluginStart()
{
    
HookAllClient()
}

public 
OnClientPutInServerclient )
{
    if( 
client )
        
SDKHookclient SDKHook_StartTouchOnStartTouch )
}

public 
Action:OnStartTouchcliententity )
{
    new 
bool:Touched false
    
if( client && IsClientInGameclient ) && IsValidEntityentity ))
    {
        
decl String:OutputName[32];
        
GetEntityClassnameentityOutputNamesizeofOutputName ))
        for( new 
i=0i<sizeofCapType ); i++ )
        {
            if( 
StrEqualOutputNameCapType[i] ))
            {
                
TF2_IgnitePlayer(client,client)
                
PrintToChatAll"%N was ignited"client )
                
Touched true
                
break
            }
        }
    }
    if( 
Touched ) return Plugin_Handled
    
    
return Plugin_Continue
}

HookAllClient()
{
    for( new 
i=MaxClientsi>0i-- )
    {
        if( 
IsClientConnected) && IsClientInGame))
        {
            
SDKHookSDKHook_StartTouchOnStartTouch )
        }
    }

EDIT: I m thinking.. if you stand still there and ain't move, there is a chance you double ignited, triple and so on.. anyway, i cant help it, no clue at all.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-22-2013 at 12:27.
GsiX is offline
xerox_i_
Member
Join Date: Mar 2013
Old 12-22-2013 , 14:02   Re: [TF2] Events on player capture point
Reply With Quote #13

@GsiX dont work i cap the point but not ignite
xerox_i_ is offline
xerox_i_
Member
Join Date: Mar 2013
Old 12-22-2013 , 14:12   Re: [TF2] Events on player capture point
Reply With Quote #14

i got an idea have anyway to get cappers name? i can execute an server command with ServerCommand
xerox_i_ is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-22-2013 , 14:21   Re: [TF2] Events on player capture point
Reply With Quote #15

i refer to this comparison.. maybe you need to correct them..

PHP Code:
new const String:CapType[5][32] =
{
    
"team_control_point_master",
    
"team_control_point",
    
"trigger_capture_area",
    
"item_teamflag",
    
"func_capturezone"

__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
xerox_i_
Member
Join Date: Mar 2013
Old 12-22-2013 , 14:44   Re: [TF2] Events on player capture point
Reply With Quote #16

yah but can i use that string of event?

teamplay_point_startcapture

Note: When a point is beginning to be captured

string: cappers

i think this string can print the name of the players in point

Last edited by xerox_i_; 12-22-2013 at 14:44.
xerox_i_ 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 10:21.


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