Raised This Month: $ Target: $400
 0% 

Replace default motd


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jakubs777
Junior Member
Join Date: Nov 2009
Old 03-20-2014 , 23:52   Replace default motd
Reply With Quote #1

Hi guys,

I would like to replace default motd, because I want to pass SteamId value.
After I connect to my server I can only see my default motd and nothing happen.

//UPDATE: I rebuild the code. When I type /showmotd it works, but on client_authorized it just doesnt work.
I renamed motd.txt to disable it. It is off, but my own doesnt show up.

My code:
Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init() 
{
register_plugin("Own motd", "1.0", "Me")
register_clcmd("say /showmotd","showsteamid")
}

public showsteamid(id) 
{
new steamid[32]
get_user_authid (id,steamid,31)

new szWebsite[ 128 ];
formatex( szWebsite, 127, "http://mysite.com/motd.php?sid=%s", steamid);
show_motd(id, szWebsite);

return PLUGIN_CONTINUE
}

public client_authorized(id)
{
new steamid[32]
get_user_authid (id,steamid,31)
    
new szWebsite[ 128 ];
formatex( szWebsite, 127, "http://mysite.com/motd.php?sid=%s", steamid);
show_motd(id, szWebsite);

    
return PLUGIN_CONTINUE
}
any ideas?

PLEASE HELP

Last edited by jakubs777; 03-21-2014 at 12:42.
jakubs777 is offline
 


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 06:04.


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