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

[TF2]How to show notification of player who pickup/drop intelligence?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Poheart
Member
Join Date: Mar 2009
Old 03-26-2011 , 03:31   [TF2]How to show notification of player who pickup/drop intelligence?
Reply With Quote #1

As title said,is that something that related to
PHP Code:
    HookEntityOutput("item_teamflag""OnDrop"intel_FlagDrop);
    
HookEntityOutput("item_teamflag""OnPickUp"intel_FlagPickup);
    
HookEntityOutput("item_teamflag""OnReturn"intel_Return); 
then
PHP Code:
public intel_FlagDrop (xxxxxxxxxxxxxxxx i skip it)
{
PrintToChatAll("[WARNING]Intelligence Dropped.");

but i wondering how to display the name also,such as who PickUp the intelligence...please help

http://developer.valvesoftware.com/wiki/Item_teamflag
__________________
Administrator of HoursPlayed Inc.(www.HoursPlayed.net) Gaming Community.

Last edited by Poheart; 03-26-2011 at 03:34.
Poheart is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 03-26-2011 , 04:43   Re: [TF2]How to show notification of player who pickup/drop intelligence?
Reply With Quote #2

event teamplay_flag_event
Leonardo is offline
Poheart
Member
Join Date: Mar 2009
Old 03-26-2011 , 05:20   Re: [TF2]How to show notification of player who pickup/drop intelligence?
Reply With Quote #3

i'm stupid,can you tell me how exactly this event works
__________________
Administrator of HoursPlayed Inc.(www.HoursPlayed.net) Gaming Community.
Poheart is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 03-26-2011 , 05:28   Re: [TF2]How to show notification of player who pickup/drop intelligence?
Reply With Quote #4

so sad. but atm I just cant explain. too hard to do this from mobile phone

just look
events have a params, right?
one of them - flag event type, type of event
dropped, captured, carried, returned, defended.
eventtype is a numeric value
and I cant remember values of each of them

EDIT:
PHP Code:
public Action:Event_FlagStatus(Handle:hEvent, const String:sName[], bool:bDontBroadcast)
{
    new 
String:sClientAuth[32], String:sQuery[256];
    switch(
GetEventInt(hEvent"eventtype"))
    {
        case 
1// pick up
        
{
            new 
iClient GetEventInt(hEvent"player");
            
PrintToChatAll("%N has picked up a flag"iClient);
        }
        case 
2// captured
        
{
            new 
iClient GetEventInt(hEvent"player");
            
PrintToChatAll("%N has captured a flag"iClient);
        }
        case 
3// defended
        
{
            new 
iAttacker GetEventInt(hEvent"player");
            new 
iVictim GetEventInt(hEvent"carrier");
            
PrintToChatAll("%N has defended a flag (carried by %N)"iAttackeriVictim);
        }
        case 
4// dropped
        
{
            new 
iClient GetEventInt(hEvent"player");
            
PrintToChatAll("%N has dropped a flag"iClient);
        }
        case 
5// returned
        
{
            
PrintToChatAll("A flag has been return to base"iClient);
        }
    }
    return 
Plugin_Continue;


Last edited by Leonardo; 03-26-2011 at 07:24.
Leonardo 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 00:41.


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