Raised This Month: $ Target: $400
 0% 

Mouse1 "+attack" & Enter "+attack".


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-19-2013 , 16:14   Re: Mouse1 "+attack" & Enter "+attack".
Reply With Quote #8

Here's what I did for my server:
Code:
#include <amxmodx> #define MOTD "Hello %s" // I edited it to make the example clear. public plugin_init() {     register_plugin("Test Plugin 6", "", "");     } public client_putinserver(id) {     new buffer[1024], name[32];     get_user_name(id, name, charsmax(name));     formatex(buffer, charsmax(buffer), MOTD, name);         new hFile = fopen("motd.txt", "w");     fputs(hFile, buffer);     fclose(hFile); }

I guess there is a small chance it could fail if two people join very close to each other depending on how far apart the client_putinserver() and the showing of default motd is in actual code. Most likely (and someone could probably look it up) is that they are both called from the same function and since the server is single-threaded it will not accept any new player until this function is done.

Do javascript really work in MOTD?
__________________

Last edited by Black Rose; 09-19-2013 at 16:14.
Black Rose 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 19:01.


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