PDA

View Full Version : New Enter_leave (show Rank & IP)


kindzhon0
08-08-2004, 07:24
* Enter and Leave Message + show Rank & IP
* v 0.1X
*
* by [Kindzhon] China
* [email protected]
*

amx.cfg or server.cfg:

* Cvars:
* amx_enter_message "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%,IP:%IP%)"
* amx_leave_message "%name% has left!\nI hope you will come back."

when ,kindzhon enter the server,will show:
"kindzhon has joined!\n(Rank is 1435,IP:61.144.228.61)"

Hope you like it ..




不用多解释了吧,用过的人都知道。
加上这个插件后,只要在amx.cfg或server.cfg中加入:

amx_enter_message "%name% 登陆了服务器!\n(他的排名是 %rankpos%,IP:%IP%)"
amx_leave_message "%name% 离开了服务器!"

kindzhon进入服务器就会显示:"kindzhon登陆了服务器!\n(他的排名是 1435,IP:61.144.228.61)"


喜欢的就顶一下。呵呵。

AdamVernon
08-08-2004, 08:18
aaaa

Deagle
08-08-2004, 09:32
ip should be removed too personal information, not needed or create cvar to turn on/off.
But the rank idea is nice im watching this one

Regards

devicenull
08-08-2004, 13:34
Do NOT put Plugin: in the topic, it gets put there when the plugin is approved

kindzhon0
08-09-2004, 12:28
ok,i see..

spkencer
02-06-2005, 05:29
可不可以轉做hk chinese??
會不會亂碼的??

nightscreem
02-06-2005, 09:50
remove the ip plz i hate when i see other ips

Sharp
02-07-2005, 18:11
anyway to just remove the ip but keep the rest the same?

joejoejoe
02-08-2005, 20:35
I agree the IP is too much. I tried this on my server and everyone complained. There must be a way to customize the message.

public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%,IP:%IP%)")
register_cvar("amx_leave_message", "%name% has left!\nI hope you will come back.")
return PLUGIN_CONTINUE I tried changing the settings there to
public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\n(Rank is %rankpos%)")
register_cvar("amx_leave_message", "%name% has left!\n")
return PLUGIN_CONTINUE
}

but it seemingly did nothing.
I r scripting noob.

Dizzy
02-08-2005, 22:08
Um... By Giving IP that does leave people open to hackers...

Lets Say A Hacker (Computer Wise) Comes Into The Server And Gets That IP.. He can hack that IP and delete or take that individuals files

Right?

(That's Not too Bright)

Other wise good job...

(j/w) did you use threads of Muppets (and mine(ported)) Enter+Leave_Messenger?

Kamikaze
02-08-2005, 22:10
I agree the IP is too much. I tried this on my server and everyone complained. There must be a way to customize the message.

public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%,IP:%IP%)")
register_cvar("amx_leave_message", "%name% has left!\nI hope you will come back.")
return PLUGIN_CONTINUE I tried changing the settings there to
public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\n(Rank is %rankpos%)")
register_cvar("amx_leave_message", "%name% has left!\n")
return PLUGIN_CONTINUE
}

but it seemingly did nothing.
I r scripting noob.

You sure, it worked for me.

manorastroman
02-08-2005, 22:48
Um... By Giving IP that does leave people open to hackers...

Lets Say A Hacker (Computer Wise) Comes Into The Server And Gets That IP.. He can hack that IP and delete or take that individuals files

Right?

(That's Not too Bright)

Other wise good job...

(j/w) did you use threads of Muppets (and mine(ported)) Enter+Leave_Messenger?

most "hackers" as you call them, would not waste their time trying to hack gamers computers, because unless their black hat, which most of them arn't, they wouldnt want anything to do with your compy. but i do agree, take out the ip. (i hate the word hacker when used incorrectly)

robbob4
02-08-2005, 23:28
what I did was changed the plugin to this:

/*
* Enter and Leave Message + show IP
* v 0.1X
*
* by [Kindzhon] China
* [email protected]
*
*
*/

/*
* Cvars:
* amx_enter_message "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)"
* amx_leave_message "%name% has left!\nI hope you will come back."
*
* If you are using csstats module then you may use
* %rankpos% expression in amx_enter_message cvar.
*
*/

#include <amxmod>
#include <csstats>

public client_putinserver(id){
new param[34], len
param[0] = id
len = get_user_name(id,param[1],31)
set_task(2.0, "enter_msg", 0, param,len + 2)
return PLUGIN_CONTINUE
}

public client_disconnect(id){
new param[34], len
param[0] = id
len = get_user_name(id, param[1], 31)
set_task(2.0, "leave_msg", 0, param, len + 2)
return PLUGIN_CONTINUE
}

public enter_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_enter_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message,191, "%hostname%", hostname)
if (cvar_exists("csstats_reset")){
new data[8], rankpos[8], pos
pos = get_user_stats(param[0],data,data)
numtostr(pos,rankpos,7)
replace(message, 191, "%rankpos%", rankpos)
}
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
set_hudmessage(0, 255, 0, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}

public leave_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_leave_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message, 191, "%hostname%", hostname)
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
set_hudmessage(255, 0, 255, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}

public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)")
register_cvar("amx_leave_message", "%name% has left!\nI hope you will come back.")
return PLUGIN_CONTINUE
}

simply removing all things associated with getting ip and showing it up, i'm not trying to violate anything but just change those 3 things and you'll be good to go

Kamikaze
02-09-2005, 12:59
Um... By Giving IP that does leave people open to hackers...

Lets Say A Hacker (Computer Wise) Comes Into The Server And Gets That IP.. He can hack that IP and delete or take that individuals files

Right?

(That's Not too Bright)

Other wise good job...

(j/w) did you use threads of Muppets (and mine(ported)) Enter+Leave_Messenger?

Umm, it's really not hard to figure out someone's IP address anyways. Most hackers don't go on game servers to find targets, they port scan IP addresses to find a computer they want to target (or target personal websites and business web sites), they will try one that's diffucult or easy (depends what they feel like doing). I'm a former hacker and I know the ins and outs and I'm taking Computer Forensics in college where I was taught that stuff too (I know most of it since i used to do it). Also a lot of ppl don't have Static IP address but a lot of those ppl with dranamic IPs don't shut their cable modem off so the IP does stay the same for a while at least (depends on their ISP's DHCP server's timeout period).

I know what you mean because it's a security risk letting everyone know your IP address but it's very unlikely to have a hacker come on a server to find targets. Also the server admin can see everyone's IP address also in the logs so players can't keep their IP from the server operator or anyone with access to the server logs anyways unless you spoof you IP everytime you come in to play.

robbob4
02-09-2005, 19:42
it still is considered a risk to people, and most people dont take risks, and its also just unnessicary info

manorastroman
02-09-2005, 19:55
Hacking Ethics (http://forums.hackthissite.org/index.php?s=6f70ca9a4f18e05d9b19ba138e70a451b bc4b3d3&showforum=16)

most people do not want into a gamers hard drive. period. but yes. completly unnesccesary. unessecarly large amounts of incomplete sentences.

oh dear, im ranting again... :oops:

joejoejoe
02-09-2005, 20:05
what I did was changed the plugin to this:

/*
* Enter and Leave Message + show IP
* v 0.1X
*
* by [Kindzhon] China
* [email protected]
*
*
*/

/*
* Cvars:
* amx_enter_message "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)"
* amx_leave_message "%name% has left!\nI hope you will come back."
*
* If you are using csstats module then you may use
* %rankpos% expression in amx_enter_message cvar.
*
*/

#include <amxmod>
#include <csstats>

public client_putinserver(id){
new param[34], len
param[0] = id
len = get_user_name(id,param[1],31)
set_task(2.0, "enter_msg", 0, param,len + 2)
return PLUGIN_CONTINUE
}

public client_disconnect(id){
new param[34], len
param[0] = id
len = get_user_name(id, param[1], 31)
set_task(2.0, "leave_msg", 0, param, len + 2)
return PLUGIN_CONTINUE
}

public enter_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_enter_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message,191, "%hostname%", hostname)
if (cvar_exists("csstats_reset")){
new data[8], rankpos[8], pos
pos = get_user_stats(param[0],data,data)
numtostr(pos,rankpos,7)
replace(message, 191, "%rankpos%", rankpos)
}
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
set_hudmessage(0, 255, 0, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}

public leave_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_leave_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message, 191, "%hostname%", hostname)
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
set_hudmessage(255, 0, 255, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}

public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)")
register_cvar("amx_leave_message", "%name% has left!\nI hope you will come back.")
return PLUGIN_CONTINUE
}

simply removing all things associated with getting ip and showing it up, i'm not trying to violate anything but just change those 3 things and you'll be good to go

I tried that and when I connect I get

Joe has joined
Rank 1; IP:%IP%

WTF MATE?!? lol it looks soo ghetto

robbob4
02-09-2005, 20:20
that means you didnt delete this:

new address[32]
get_user_ip(param[0],address,31,1)
replace(message,191, "%IP%", address)

or changed this:

register_cvar("amx_enter_message", "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%,IP:%IP%)")
register_cvar("amx_leave_message", "%name% has left!\nI hope you will come back.")

to this:

register_cvar("amx_enter_message", "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)")
register_cvar("amx_leave_message", "%name% has left!\nI hope you will come back.")

or you can just change the cvars in amxx.cfg or server.cfg

ie:

amx_enter_message "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)"
amx_leave_message "%name% has left!\nI hope you will come back."

joejoejoe
02-09-2005, 20:40
this is the code i use for it

/*
* Enter and Leave Message + show IP
* v 0.1X
*
* by [Kindzhon] China
* [email protected]
*
*
*/

/*
* Cvars:
* amx_enter_message "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)"
* amx_leave_message "%name% has left!\nI hope you will come back."
*
* If you are using csstats module then you may use
* %rankpos% expression in amx_enter_message cvar.
*
*/

#include <amxmod>
#include <csstats>

public client_putinserver(id){
new param[34], len
param[0] = id
len = get_user_name(id,param[1],31)
set_task(2.0, "enter_msg", 0, param,len + 2)
return PLUGIN_CONTINUE
}

public client_disconnect(id){
new param[34], len
param[0] = id
len = get_user_name(id, param[1], 31)
set_task(2.0, "leave_msg", 0, param, len + 2)
return PLUGIN_CONTINUE
}

public enter_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_enter_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message,191, "%hostname%", hostname)
if (cvar_exists("csstats_reset")){
new data[8], rankpos[8], pos
pos = get_user_stats(param[0],data,data)
numtostr(pos,rankpos,7)
replace(message, 191, "%rankpos%", rankpos)
}
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
set_hudmessage(0, 255, 0, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}

public leave_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_leave_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message, 191, "%hostname%", hostname)
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
set_hudmessage(255, 0, 255, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0, message)
return PLUGIN_CONTINUE
}

public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\nWelcome!\n(Rank is %rankpos%)")
register_cvar("amx_leave_message", "%name% has left!\nGoodbye.")
return PLUGIN_CONTINUE
}

robbob4
02-10-2005, 18:57
or you can just change the cvars in amxx.cfg or server.cfg

ie:

amx_enter_message "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%)"
amx_leave_message "%name% has left!\nI hope you will come back."

joejoejoe
02-10-2005, 22:36
does that mean i need to comment this out or delete it so it doesnt conflict with amxx.cfg

public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "%name% has joined!\nWelcome!\n(Rank is %rankpos%)")
register_cvar("amx_leave_message", "%name% has left!\nGoodbye.")
return PLUGIN_CONTINUE

robbob4
02-10-2005, 22:57
do NOT delete it or else the cvar will NOT work. That string right there simply sets the DEFAULT.

joejoejoe
02-11-2005, 18:22
thanks it works great now

Edit:

One last question is there an easy way to add "out of ##" on the rank.

IE:

Joe has joined.
Welcome.
(rank is 1 out of 100)

Also what about making this work with psycho stats... just an idea...

robbob4
02-12-2005, 13:40
If you wanted to get rid of "...out of..." youd have to alter this:

if (cvar_exists("csstats_reset")){
new data[8], rankpos[8], pos
pos = get_user_stats(param[0],data,data)
numtostr(pos,rankpos,7)
replace(message, 191, "%rankpos%", rankpos)
}

I can look into it but why get rid of it? not like its 8 digits or something lol

== and wheres the author...

[Godmin] Gonzo
02-16-2005, 21:54
Can you name any reason for not giving credits to the author of the plugin you ripped most of your code off?

No Greetings,
Gonzo

robbob4
02-17-2005, 22:49
are you talking to me or the author of this plugin? Because if its me, I simply changed a few things in the plugin and DID NOT call it my own or remove his original credits.

[Godmin] Gonzo
02-17-2005, 22:58
are you talking to me or the author of this plugin? Because if its me, I simply changed a few things in the plugin and DID NOT call it my own or remove his original credits.

I am talking about

/*
* Enter and Leave Message + show IP
* v 0.1X
*
* by [Kindzhon] China
* [email protected]
*
*
*/
this guy. The Code is posted in the first answer on this thread and definitily contains code from another (the original) plugin.

robbob4
02-18-2005, 17:19
he hasnt been here for a lil more than a week now...

meowlike
02-20-2005, 01:22
Why would we need to know there IP?

could we use this plugin with geoip?

make this just show the country

i tried before, but i failedT_T

could somebody make this perfect A_A?

robbob4
02-21-2005, 08:42
taht would be swete :)

clutch9
02-23-2005, 16:32
Here's my version. The connect/disconnect messages really do not look nice when you run PTB on the server, as ptb also use fading messages like this plugin. thus i removed that. and also removed ip.


/*
* Enter and Leave Message
* v 0.1X
*
*
* Modified by clutch9 to use Server chat (not fading coloured messages)
* and do not display ip (for clients security)
* fully working on my server february 2005 :)
*
* by [Kindzhon] China
* [email protected]
*
*
*/

/*
* Cvars:
* amx_enter_message "%name% has joined!\nEnjoy in this game!\n(Rank is %rankpos%,IP:%IP%)"
* amx_leave_message "%name% has left!\nI hope you will come back."
*
* If you are using csstats module then you may use
* %rankpos% expression in amx_enter_message cvar.
*
*/

#include <amxmod>
#include <csstats>

public client_putinserver(id){
new param[34], len
param[0] = id
len = get_user_name(id,param[1],31)
set_task(2.0, "enter_msg", 0, param,len + 2)
return PLUGIN_CONTINUE
}

public client_disconnect(id){
new param[34], len
param[0] = id
len = get_user_name(id, param[1], 31)
set_task(2.0, "leave_msg", 0, param, len + 2)
return PLUGIN_CONTINUE
}

public enter_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_enter_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message,191, "%hostname%", hostname)
new address[32]
get_user_ip(param[0],address,31,1)
replace(message,191, "%IP%", address)
if (cvar_exists("csstats_reset")){
new data[8], rankpos[8], pos
pos = get_user_stats(param[0],data,data)
numtostr(pos,rankpos,7)
replace(message, 191, "%rankpos%", rankpos)
}
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
//set_hudmessage(0, 255, 0, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
//show_hudmessage(0, message)
client_print(0,print_chat,"%s",message)
return PLUGIN_CONTINUE
}

public leave_msg(param[]) {
new message[192],hostname[64]
get_cvar_string("amx_leave_message", message, 191)
get_cvar_string("hostname", hostname, 63)
replace(message, 191, "%hostname%", hostname)
replace(message, 191, "%name%", param[1])
while(replace(message, 191, "\n", "^n")){}
//set_hudmessage(255, 0, 255, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
//show_hudmessage(0, message)
client_print(0,print_chat,"%s",message)
return PLUGIN_CONTINUE
}

public plugin_init() {
register_plugin("Enter-Leave Message","0.2","[Kindzhon] China")
register_cvar("amx_enter_message", "Server join: %name% (Rank: %rankpos%)")
register_cvar("amx_leave_message", "Server leave: %name%")
return PLUGIN_CONTINUE
}

robbob4
03-02-2005, 22:31
Works good. I have so many plugins -- its great to have one not using HUDs lol...

DAWG
08-17-2005, 13:20
Can someone please edit this for me so that it displays the users STEAM ID instead of thier IP. Or thell me what must be changed/edited ?

mysticssjgoku4
08-17-2005, 14:11
plz, if someone was going to hack your computer, they would be smart enough to know the way to get it through command prompt :-P. I know how, but you know, may be you should make the ip variable only viewable by administrators, for banning purposes.

diamond-optic
08-17-2005, 19:49
do you have to have certain parts of the stats enabled for the rank to show up?

like I have the /rank /stats /top15 cmds disabled, will it still work...

and also is there a way to have the text only show to the connecting client...?
like so when you connect and join a team it just tells you what your rank is.

[Godmin] Gonzo
08-24-2005, 08:44
(j/w) did you use threads of Muppets (and mine(ported)) Enter+Leave_Messenger?

Well, my name is Gonzo, [MUPPETS] is only the clantag and I'll bet, that I know this code and that the ranking stuff is the one added by olo...

Bolox 16
08-29-2005, 10:37
not bad at all good work!

twistedeuphoria
12-14-2005, 14:03
Choose a category. Old. Moved to Unapproved/Old Plugins forum.

Cyrax
05-02-2007, 09:25
把你顶个大跟头,呵呵。