Forum

> > CS2D > Scripts > In game ban list.
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch In game ban list.

12 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt In game ban list.

H-X
User Off Offline

Zitieren
hey guys if someone can make me a lua in which if i say !banlist and i get all the players list of ip's or USGN's which are banned.

alt Re: In game ban list.

DarkBooy
User Off Offline

Zitieren
user H-X hat geschrieben
hey guys if someone can make me a lua in which if i say !banlist and i get all the players list of ip's or USGN's which are banned.


Use Console this cmds IF you'r SERVER / RCON

cs2d cmd listbans
cs2d cmd bans

alt Re: In game ban list.

H-X
User Off Offline

Zitieren
ya guys i know that but i have to open the console but if there is any kind of way that it comes like a message.I think you get my point that i don't need to open console.

alt Re: In game ban list.

Rainoth
Moderator Off Offline

Zitieren
I can't think of any other way besides saving the players IP whenever the user is banned and then show the list when you write your command. If there's another,easier way then I'm sorry for my inexperience. I won't be doing what I said as I'm not a friend of saving/loading.

alt Re: In game ban list.

EngiN33R
Moderator Off Offline

Zitieren
This won't get temporary bans because I couldn't find a way to get them other than through using the output of the cs2d cmd bans (cs2d cmd listbans) command, and I'm not really in the mood to do that right now.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
addhook("say","getbanlist")
function getbanlist(id,txt)
	if (txt=="!banlist") then
		msg2(id,"----- List of Bans -----")
		local fh = io.open("sys/bans.lst","r")
		local bans = {}
		for line in fh:lines() do
			if line:sub(1,2)~="//" and #line>0 then
				local mode,value = line:gsub("(.+)\t\t(.+)")()
				local str = "* "
				if mode == "banusgn" then
					str = str .. "USGN ID #"
				elseif mode == "banip" then
					str = str .. "IP "
				elseif mode == "banname" then
					str = str .. "Name "
				end
				str = str .. value
				bans[#bans+1] = str
			end
		end
		msg2(id,"bans total: "..#bans)
		for _,v in ipairs(bans) do
			msg2(id,v)
		end
		fh:close()
		return 1
	end
end

alt Re: In game ban list.

Dimas541
User Off Offline

Zitieren
@user EngiN33R: You give her the code there is an error
I was trying to use bots
I kept bans, and I wrote! banlist writing this only ----- List of Bans -----

Admin/Mod Kommentar

Please don't quote long posts. /EngiN33R

alt Re: In game ban list.

EngiN33R
Moderator Off Offline

Zitieren
user Dimas541 hat geschrieben
@user EngiN33R: You give her the code there is an error
I was trying to use bots
I kept bans, and I wrote! banlist writing this only ----- List of Bans -----

Well, as far as I checked, it didn't have any errors. Mind at least saying what the error text is, if there is any?

alt Re: In game ban list.

MikuAuahDark
User Off Offline

Zitieren
user Dimas541 hat geschrieben
@user EngiN33R: You give her the code there is an error
I was trying to use bots
I kept bans, and I wrote! banlist writing this only ----- List of Bans -----


Are you sure that there is also a "total bans: 0" message? if not then make sure that your CS2D have full-rights. If it's also showing "total bans: 0" then there is no banned players on your server

alt Re: In game ban list.

omg
User Off Offline

Zitieren
yea, u cant really ban bots because theyre part of server. u have to ban an actual player. if u have dedicated server, u can actually ban urself and then remove the ban later
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht