Files

> > CS2D > Lua Scripts > [Mora]Ignorelist
Files overviewCS2D overviewLua Scripts overview

English [Mora]Ignorelist >

39 comments2 kb, 563 Downloads

old [Mora]Ignorelist

Mora
User Off Offline

Hello unrealsoft.
I tried to find something in the f.a. but notice that there is no ignore lua.

Description: This lua allow you to ignore chat of player(s). You can add people into ignore list and you won't be able to see their messages.
INFO
It's different than MUTE script!! because you can personally mute for your own some(or all) players and only you wouldn't be able to see their messages. Everyone else would see them aswell, until they use ignore on them too.

Available commands are:
• !ignore id
Add player into your ignore list if he's exists.
• !unignore id
Remove player from your list if he's exists.
• !ignoreall
Ignore all players(if server is not empty) and if you have atleast one not ignored.
• !unignoreall
Unignore all players(if your ignore list is not empty).
• !ignorelist
Show you list of players you ignore(if have).
ADDED
!whoignoreme
Show you list of players who ignore you(if have).
INFO
You may disable/enable !whoignoreme command using 5-th line in cases if you want to allow/disallow this command on your server. You can do it via
ALLOWED_TO_SEE_PLAYERS_WHO_IGNORE_YOU

> people who left server while existing in your ignore list will be removed automatically. Have message.
> you cant add yourself into your ignore list(obviously)

INFO
Feel free for edit for your own but keep in the mind is not fully yours. So do not claim it yourself.

The code >


Sorry me for my bad english and grammar,
thank you for attention.
edited 8×, last 07.09.17 04:31:59 pm
Approved by Seekay

Download Download

2 kb, 563 Downloads

Comments

39 comments
Page
To the start Previous 1 2 Next To the start

Comments disabled

The comment function is disabled. It is not possible to write comments here.

old

Mora
User Off Offline

@user Nekomata: Yes i know about it and thought to do like that ~ a month ago when tried to develop ffa mod, but you see the description. I'm lazy to remake this These colours are as much old as TopNotch's administration script.

old

Nekomata
User Off Offline

Here's a tip. You can improve on the
COLOURS
table code with something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
COLOURS = {
["yellow"] = "\169255220000",
["white"] = "\169255255255",
...
["wood_box"] = "\169116088069"
}

// OR

COLOURS = {
yellow = "\169255220000",
white = "\169255255255",
...
wood_box = "\169116088069"
}

So next time all you'd have to do is
COLOURS["yellow"] --[[or]] COLOURS.yellow
, instead of looking up what it's key is numerically indexed at.

And they're the same thing too!

old

THEMUD
User Off Offline

@user Mora: The next() function returns the key and the value of the next element from a table. It can be used with a view to check if a table is empty, and so the code given below does the check.

Read this URL beside to acquire more information. next() Lua Function

old

Mora
User Off Offline

Idk which problems it would have?
I'm using to check firstly using boolean then break searching, then after that i remove the table key completely, not just a value of this key. The cycle is end.
And also if you haven't this id in your list you won't have problems anyway.

I never heard of
if not next(PLAYERS[id]) then

I'll find some more info about it. Thank you for the hint.
This "next" would check automatically that type of this PLAYERS[id] equals {}(table)? Because if i remove all the keys from table via table.remove it still table(PLAYERS[id]={}). Is this means this "next()" check if you have any keys in it?

old

THEMUD
User Off Offline

@user Talented Doge: I would rather recommend using
if next(PLAYERS[id]) == nil then
.

Because suppose
[false] = true
in the table, not next() wouldn't count it.

old

Talented Doge
User Off Offline

As you have used table.remove to manipulate the table, I would recommend you to use the following to replace how you check if a table is empty:

if not next(PLAYERS[id]) then
instead of
if #PLAYERS[id].ID~=0 then

old

Mora
User Off Offline

@user Gaios: This is new only in f.a., but not as idea
Thank you.

old

Gaios
Reviewer Off Offline

something new √

old

Mora
User Off Offline

@user saint-: Added command !whoignoreme. Which show you list of players who ignore you. Also it's possible to disable this command:
IMG:https://i.imgur.com/iDmKRVU.png

Allowed by default.
edited 2×, last 09.07.17 02:31:30 pm

old

saint-
User Off Offline

Cool script mora. I can imagine such a function in cs2d, with the addition that the other guy, who is on your ignorelist, can know that you ignore him.

old

Mora
User Off Offline

@user GeoB99: i can't have usgn ids to disallow comment here. I'm sure there wont be such shit if i'll be able.
Sorry.
@user xsiN: for sure, since it's old. But i'm first who did it here even if it's bad-scripted
@user _Yank: ye i see. I know "AND" but hem, mine lua skills is not even average. How the colour's table comments making it worse(if it does)? ;d It's not making much sense with or w/o them. I've been lazy to remove them because using this thing on each lua. But if you dont need to edit this it's okay.
@user pepinakiller: might be.

old

_Yank
User Off Offline

I double what user Dousea said.
You should also have a look at Lua's AND keyword. The script would also be better if you removed the unnecessary entries at the COLORS table IMHO.

old

xsiN
User Off Offline

Nothing new for me

old

GeoB99
Moderator Off Offline

You guys should stop arguing each other or I'm forced to give a temp.ban and delete further non-related comments. Use the PM function for that. I wish I wasn't that harsh, you know.

old

Mora
User Off Offline

@user -Francis: do you see colours table? You can change any kind of colours you want! feel free:
some images >


something for user _3yrus
here >

old

-Francis
User Off Offline

I don't like the colors.

old

Masea
Super User Off Offline

@user _3yrus: Well, if you posted that comment for the only user Mora, you better use PM because you're in a forum, do not forget that √ I'm not supporting anyone right now, I just hate the comments that have no reasons why is that.

user _3yrus has written
I created a thread about my football idea. And u called it shit. Now I call ur script shoot, what's wrong.?
The wrong thing is you can't just change your behavior by what others posted to your thread. If they said that your anything is shit, you can't go and say his work shit too if what they said is true and what you say is false. We call it child job.

Before saying "pls stop replying", you better do that yourself first because I can't stop while you're shitting out there so can't user Mora either.

old

_3yrus
User Off Offline

user Masea : who the he'll are u? Did I talk to u? U said me shut up, and I answer u close ur fking mouth and be quiet till I talk to u.ur mouth is bigger than ur brain baby girl. are u superman who support people??

user Mora : I created a thread about my football idea. And u called it shit. Now I call ur script shit, what's wrong.?

And pls stop replying. I'm wasting my time for taking to u.
Tnks

old

Shrepard
User Off Offline

Good!
To the start Previous 1 2 Next To the start