Raised This Month: $ Target: $400
 0% 

showip


Post New Thread Reply   
 
Thread Tools Display Modes
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
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-12-2013 , 06:59   Re: showip
Reply With Quote #2

what do you want this plugin to do ?
__________________
Blizzard_87 is offline
KuteManaal
Junior Member
Join Date: Jan 2013
Location: DoNGaming.com
Old 05-12-2013 , 07:06   Re: showip
Reply With Quote #3

when the players type /ip on chat the server ip will be shown to them
__________________
Join the Zombie Madness
KuteManaal is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-12-2013 , 07:13   Re: showip
Reply With Quote #4

ive tested the code.... seems to work by showing the server ip... whats wrong with it?
__________________
Blizzard_87 is offline
KuteManaal
Junior Member
Join Date: Jan 2013
Location: DoNGaming.com
Old 05-12-2013 , 07:16   Re: showip
Reply With Quote #5

Quote:
Originally Posted by Blizzard_87 View Post
ive tested the code.... seems to work by showing the server ip... whats wrong with it?
getting errors while i complie it,this aint my plugin a friend told me to fix it even i could not so im asking you guys we could't compile it.first it came that the include was missing then i compiled it with it then some crazy errors came

could not load out
__________________
Join the Zombie Madness

Last edited by KuteManaal; 05-12-2013 at 07:19.
KuteManaal is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-12-2013 , 07:18   Re: showip
Reply With Quote #6

Assuming you are compiling it locally and with the colorchat include file, it compiles fine
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 05-12-2013 , 07:31   Re: showip
Reply With Quote #7

i edited your file and added my color stock to it so it will compile with the online compiler.
Attached Files
File Type: sma Get Plugin or Get Source (IP-cmd.sma - 580 views - 1.9 KB)
__________________
Blizzard_87 is offline
Egan
BANNED
Join Date: May 2013
Location: GB
Old 05-12-2013 , 07:56   Re: showip
Reply With Quote #8

yeah thanks for posting it for me bro i was too lazy to make a thread my self and the plugin works so

problem solved///close thread
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
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 16:15.


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