Raised This Month: $ Target: $400
 0% 

Hostname


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FlyingHorse
Senior Member
Join Date: Apr 2010
Location: Under your bed.
Old 05-19-2010 , 15:54   Hostname
Reply With Quote #1

which code do i use to recieve hostname? .. I'm a new coder.. I was coding this plugin, and i got stuck here and i dunno what to do...
Code:
#include <amxmodx>
#include <colorchat> 

new const   PLUGIN[ ] = "Welcome messages"
new const  VERSION[ ] = "1.0"
new const  AUTHOR[ ] = "FlyingHorse"

new   prefix[ ] = "[AMXX]^x04"

public plugin_init()
{ 
    register_plugin(PLUGIN, VERSION, AUTHOR)
} 

public welcomemsg(id)
{
    new name[33]
    get_user_name(id, name, 32)
    ColorChat(id, RED, "%s %s, Welcome to (hostname)", prefix, name)
} 

public client_putinserver(id)
{ 
    set_task(10.0, "welcomemsg", id)
}
instead of (hostname) I want it to read the servers hostname, to whatever i change it to.. Instead of having to change the code every time i want to change hostname.

Last edited by FlyingHorse; 05-19-2010 at 16:17.
FlyingHorse is offline
Send a message via Skype™ to FlyingHorse
 


Thread Tools
Display Modes

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 03:38.


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