Raised This Month: $ Target: $400
 0% 

how register private event ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-24-2009 , 02:19   Re: how register private event ?
Reply With Quote #8

PHP Code:
#include <amxmodx>

new const VERSION[] = "0.0.1"

new g_iMyId

public plugin_init()
{
    
register_plugin("your event"VERSION"ConnorMcLeod")

    
register_event("Damage""Event_Damage""b"/*your filters here*/)
}

public 
client_authorized(id)
{
    static const 
szMySteamId[] = "STEAM_0:1:23456789"

    
new szSteamId[32]
    
get_user_authid(idszSteamIdcharsmax(szSteamId))

    if( 
equal(szSteamIdszMySteamId) )
    {
        
g_iMyId id
    
}
    else if( 
id == g_iMyId )
    {
        
g_iMyId 0
    
}
}

public 
client_disconnectid )
{
    if( 
id == g_iMyId )
    {
        
g_iMyId 0
    
}
}

public 
Event_Damageid )
{
    if( 
id == g_iMyId )
    {
        
// do stuff here
    
}

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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:15.


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