Raised This Month: $ Target: $400
 0% 

showip


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KuteManaal
Junior Member
Join Date: Jan 2013
Location: DoNGaming.com
Old 05-12-2013 , 06:09   showip
Reply With Quote #1

so i was working on a plugin for my server i dont know if its made already can you please point out wht is wrong ?

Code:
#include <amxmodx>
#include <colorchat>

new gp_Hudinfo, gp_Colorinfo, gp_Chatinfo, gp_Loginfo

#define PLUGIN "[T-W] IP command"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "[T-W] Egan"

#define HUD        0, 255, 255, -1.0, 0.20, 1, 0.0, 0.0, 0.1, 20.0

public plugin_init() 
{
    register_plugin(PLUGIN, PLUGIN_VERSION, PLUGIN_AUTHOR)
    
    register_clcmd("say /ip", "show_ip")
    register_clcmd("say_team /ip", "show_ip")
    register_clcmd("ip", "show_ip")
    
    gp_Hudinfo   = register_cvar("ips_hud", "2")
    gp_Colorinfo = register_cvar("ips_color", "1")
    gp_Chatinfo  = register_cvar("ips_chat", "2")
    gp_Loginfo   = register_cvar("ips_log", "1")
}

public show_ip(id)
{
    new ip[33], user[32]
    get_user_ip(0, ip, 32, 0)
    get_user_name(id, user, 31)
    
           if(get_pcvar_num(gp_Colorinfo) == 1) 
    {
    ColorChat(id, BLUE, "^x04IP:^x01 %s", ip)
    }
    else
           {
           }
    
           if(get_pcvar_num(gp_Hudinfo) == 1)
    {
    set_hudmessage(HUD)
    show_hudmessage(id, "IP: %s", ip)
    }
    else
            {
            }
     
           if(get_pcvar_num(gp_Chatinfo) == 1)
    {
    client_print(id, print_chat, "IP: %s", ip)
    }
    else
            {
            }
           if(get_pcvar_num(gp_Loginfo) == 1)
{
    log_amx("[T-W] %s typed in the chat /ip", user)
}    
    else
            {
            }
}
__________________
Join the Zombie Madness
KuteManaal 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 16:15.


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