Raised This Month: $ Target: $400
 0% 

rcon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kmal2t
BANNED
Join Date: Apr 2006
Old 04-26-2006 , 05:11   rcon
Reply With Quote #1

can amx use rcon fully? such as run any rcon command and possibly get rcon information. i.e if you ran a command like amx_rcon maps * could it get that information?

Also, there is a command to detect when someone joins. What is the command to detect if someone is downloading off of the server? client_download(id) or something?
kmal2t is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-26-2006 , 16:12  
Reply With Quote #2

Anyone?
kmal2t is offline
BadAim
Senior Member
Join Date: Feb 2006
Location: canada
Old 04-26-2006 , 19:31  
Reply With Quote #3

the only thing u can get is a plugin connect_anounce and it dont say if the guy is donwloading or not
BadAim is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-26-2006 , 20:45  
Reply With Quote #4

Ok so then you can detect when they connect.

Can you detect when they join the game?
kmal2t is offline
KoST
Senior Member
Join Date: Jul 2005
Old 04-26-2006 , 20:50  
Reply With Quote #5

Code:
client_authorized - Called when a player has authenticated with Steam
client_command - Called when a client sends a command.
client_connect - Called when a client connects
client_disconnect - Called when a player disconnects
client_infochanged - Called when a user's client info struct is changed
client_putinserver - Called when a player is initialized into the game.
  • Quote:
    Originally Posted by kmal2t
    Ok so then you can detect when they connect.
  • public client_connect(id){}
  • Quote:
    Originally Posted by kmal2t
    Can you detect when they join the game?
  • public client_putinserver(id){}
__________________
KoST is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-26-2006 , 21:33  
Reply With Quote #6

asdf

Last edited by kmal2t; 05-21-2007 at 04:39.
kmal2t is offline
KoST
Senior Member
Join Date: Jul 2005
Old 04-26-2006 , 21:45  
Reply With Quote #7

ok, you can use get_gametime() function to store start_time in client_connect and end_time in client_putinserver, then calculate the difference..

Code:
#include <amxmodx> new Float:start_time[33] new Float:end_time[33] public plugin_init(){     register_plugin("ConnectTime","1.0","KoST") } public client_connect(id){     start_time[id]=get_gametime()     return PLUGIN_CONTINUE } public client_putinserver(id){     end_time[id]=get_gametime()         new Float:difference=end_time[id]-start_time[id]     if (difference>7.0){         //do kick here     }     return PLUGIN_CONTINUE }

but you can also disable download from server very easy:
set server-cvar 'sv_allowdownload 0'
__________________
KoST is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-26-2006 , 22:25  
Reply With Quote #8

what do I replace //do kick here with to have it do amx_rcon kick "user" "message" ???

And out of curiosity why is it return PLUGIN_CONTINUE and not handled since once they join the game or are kicked the plugin has completed it's function?
kmal2t is offline
KoST
Senior Member
Join Date: Jul 2005
Old 04-26-2006 , 22:49  
Reply With Quote #9

Code:
#include <amxmodx> new Float:start_time[33] new Float:end_time[33] public plugin_init(){     register_plugin("ConnectTime","1.0","KoST") } public client_connect(id){     start_time[id]=get_gametime()     return PLUGIN_CONTINUE } public client_putinserver(id){     end_time[id]=get_gametime()         new Float:difference=end_time[id]-start_time[id]     if (difference>7.0){         new userid=get_user_userid(id)           server_cmd("amx_kick #%d %s",userid,"Reason here")     }     return PLUGIN_CONTINUE }

im not quite sure if server_cmd is blocked when you put PLUGIN_HANDLED in client_putinserver, in client_connect you could use PLUGIN_HANDLED

[edit]
i use PLUGIN_HANDLED only if i want to block things.
__________________
KoST is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 04-26-2006 , 23:13  
Reply With Quote #10

I think something is wrong in the kick function. I'm gonna see if I can fix it.
kmal2t 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 05:14.


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