Raised This Month: $ Target: $400
 0% 

Getting certain IP adress


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 09-26-2012 , 07:45   Getting certain IP adress
Reply With Quote #1

I'm making plugin with would write a message to a connected player by the IP adress.
And I'm not sure do i need to check once again IP in "announcment" function?

PHP Code:
#include <amxmodx>
#include <amxmisc>

new ip_set;
new 
g_IP[33];

public 
plugin_init()
{
    
register_plugin("IP Announc""1.0""GhostMan");
    
ip_set register_cvar("amx_ipannounc""11.22.33.44");
}

public 
client_putinserver(id)
{
    
get_user_ip(idp_IPcharsmax(p_IP), 0);

    if(
g_IP[id] == ip_set)
    {
        
set_task(35.0"announcment")
    }
}

public 
announcment(id)
{
    if(
g_IP[id] == ip_set)
    {
        new 
p_Name[33];
        
get_user_name(idp_Namecharsmax(p_Name))

        
set_hudmessage(2552550, -1.0, -1.016.08.0)
        
show_hudmessage(id"Hello %s"p_Name)
    }


Last edited by GhostMan; 09-26-2012 at 07:50.
GhostMan 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 17:51.


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