Raised This Month: $51 Target: $400
 12% 

Solved [REQUEST][Half-Life] Server console player connect log


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tiltedShrimp
Member
Join Date: Feb 2024
Old 02-27-2024 , 10:40   [REQUEST][Half-Life] Server console player connect log
Reply With Quote #1

Hey,
im interested in a plugin, which would push a message/log in the dedicated server's console whenever a player connects to a server, I'd appreciate if someone could help me out with that.

Thanks !

Last edited by tiltedShrimp; 03-07-2024 at 15:17.
tiltedShrimp is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 02-27-2024 , 10:57   Re: [REQUEST][HL] Server console player connect log
Reply With Quote #2

PHP Code:
public client_connect(id)
{
    new 
nick[32]; get_user_name(idnickcharsmax(nick))
    
    
server_print(">> %s has connected."nick)

__________________
mlibre is offline
tiltedShrimp
Member
Join Date: Feb 2024
Old 02-27-2024 , 11:22   Re: [REQUEST][HL] Server console player connect log
Reply With Quote #3

Quote:
Originally Posted by mlibre View Post
PHP Code:
public client_connect(id)
{
    new 
nick[32]; get_user_name(idnickcharsmax(nick))
    
    
server_print(">> %s has connected."nick)

Thank you ! Where shall I put the code? Sorry for newbie questions, Im still in a learning phase

EDIT: Found where to put it, admincmd file, thank you for the help good Sir !

Last edited by tiltedShrimp; 02-27-2024 at 11:28. Reason: SOLVED
tiltedShrimp is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-27-2024 , 21:36   Re: [REQUEST][HL] Server console player connect log
Reply With Quote #4

Quote:
Originally Posted by tiltedShrimp View Post
Thank you ! Where shall I put the code? Sorry for newbie questions, Im still in a learning phase

EDIT: Found where to put it, admincmd file, thank you for the help good Sir !
No, do not put it there. You should create a new plugin for just this code because the next time you update AMX Mod X, that will disappear. You should be able to just add "#include <amxmodx>" at the top of the file and then the function and compile it. Then add the plugin like you would any other new plugin.
__________________
fysiks is offline
tiltedShrimp
Member
Join Date: Feb 2024
Old 02-27-2024 , 21:51   Re: [REQUEST][HL] Server console player connect log
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
No, do not put it there. You should create a new plugin for just this code because the next time you update AMX Mod X, that will disappear. You should be able to just add "#include <amxmodx>" at the top of the file and then the function and compile it. Then add the plugin like you would any other new plugin.
Hey, thank you for your time and effort, I corrected my mistake in the way you mentioned and everything is working flawlessly, thank you so much !

Last edited by tiltedShrimp; 02-27-2024 at 21:53.
tiltedShrimp is offline
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 19:48.


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