English Advanced minute advertisement icon

21 comments
10.04.14 06:42:19 pm
like 4 like it!
650 b, 100 Downloads
TopNotch
User
Offline Off
Hello everyone,

I think the title says enough already.

• Features •
∗ Unlimited custom advertisements
∗ Random advertisements every minute

• Commands •
∗ !ads - Counts how many items there are to advertise
∗ !advertise <item> - Adds an item to be advertised.

• FAQ •
How to change the advertisements? >

How to add/change a color? >


Guess what? You can do whatever you want with it, just don't claim it as yours.

This file was modified last on 11/04/2014
imageimageimage
edited 3×, last 29.07.14 05:22:41 pm
ok This file has been reviewed and approved by Fraizeraust (12.03.16 03:01:05 pm)

Comments

21 comments
Goto Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in
07.02.16 11:10:43 am
Up
Fraizeraust
Moderator
Offline Off
@user Dracosto: Argh, wait there's another solution to do that easier than what I've posted below.
Code:
1
timer(5000, "parse","sv_msg "..string.char(169).." "..color.." "..messages[math.random(1, #messages)])

Just replace the parser line with this. I could have think about this before but I didn't pay attention into that. Silly me.
07.02.16 11:00:48 am
Up
Dracosto
User
Offline Off
user Fraizeraust: still no work but thanks for the attention ..
07.02.16 09:57:47 am
Up
Fraizeraust
Moderator
Offline Off
@user Dracosto:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
-- CONFIG --
admin = {95753}
messages = {"Message 1","Message 2","Message 3"} -- Edit this
color = "216117117" -- You can change the color of the advertisement here
Seconds = 0 -- This should be kept un-touched

-- MAIN SCRIPT --
addhook("second","_second")
function _second()
     if Seconds == 5 then -- This is where you can change the second value in your choice
          parse('sv_msg '..string.char(169)..''..color..''..messages[math.random(1,#messages)])
     end
end
07.02.16 04:19:28 am
Up
Dracosto
User
Offline Off
@user Fraizeraust: ohh Thanks but how to assign 5 seconds show up in each message ??
06.02.16 04:00:37 pm
Up
Fraizeraust
Moderator
Offline Off
@user Dracosto: You can do that by replacing cs2d lua hook minute hook with cs2d lua hook second. It won't take a long time.
Code:
1
2
addhook("minute","_minute")
function _minute()

This is where you have to change it, also you can change the hook function name but that it's optional. Note that you must change the function name too by the way:
Code:
1
2
addhook("second","_second")
function _second()
06.02.16 03:30:51 am
Up
Dracosto
User
Offline Off
how to change it from minute to seconds ?? cause its causes such time to show it up cause my server is only 3 mins long and round ends usually in just 1m30s

I'm just planning to set it up every 5 seconds
11.06.14 04:10:53 am
Up
Nemesis1999
User
Offline Off
Very nice, keep it up!
08.06.14 11:03:50 am
Up
Sparty
Reviewer
Offline Off
Alright, Very creative and its okay.
07.06.14 05:22:01 pm
like I like it!
Up
Hellcat
GAME BANNED
Offline Off
Easy but i like!
12.04.14 04:44:07 pm
like I like it!
Up
H-X
User
Offline Off
@user oxytamine and @user gUtZ: Any proof?
11.04.14 03:04:19 pm
Up
oxytamine
User
Offline Off
I hereby declare that this script was originally written by gUtZ.
11.04.14 01:14:51 pm
Up
gUtZ
User
Offline Off
So I can claim it as my friend's?
10.04.14 11:12:36 pm
Up
TopNotch
User
Offline Off
user Alistaire 1. That's the code inside the .vbs.
Spoiler >

Deleted it as some just can't trust it.

2, 3: No need fix, simply removed.

4: I don't want to spent time in making an administration system for this.

EDIT: Gonna update the file tommorow.
edited 3×, last 10.04.14 11:25:30 pm
10.04.14 10:25:44 pm
Up
Communism
Reviewer
Offline Off
@user Alistaire:
You need to use #<table name> in order to get a table length. Your information is outdated.
10.04.14 10:17:00 pm
Up
Alistaire
User
Offline Off
Detailed comments:

1. You added a .vbs in your .zip. I read the code and it's not malicious, but please note that it is kinda suspicious to add a script (in vbs, which has IO support and could literally contain any virus you want) in your very empty zip archive.

2. Your code will break. The color = {} array has one comma too many, which is a syntax error.

3. Your code states one could add more RGB colour values. However, your script practically doesn't utilize any more (or any less) than 3. This is not a feature, and it shouldn't be listed as one.

4. The saycommands are accesible to anyone. This means anyone could come to a server with your script, spam "!advertise lol", and wreck an entire advertisement system.

5. Your tablelength() function's return isn't saved and is virtually useless. If you're gonna table.insert() messages into a table, they're numerically ordered and can their length can be returned with #array, without your completely unnecessary tablelength() function.
edited 1×, last 10.04.14 10:31:01 pm
10.04.14 09:54:40 pm
Up
TopNotch
User
Offline Off
@user AlcatrazZ: I was just trolling a polish guy. (:
10.04.14 09:21:50 pm
like I like it!
Up
AlcatrazZ
BANNED
Offline Off
Why are you use PL tag?
PL - Poland
10.04.14 09:16:11 pm
Up
TopNotch
User
Offline Off
user Alistaire Didn't get you.
user Rainoth Thanks. And, could also be used for tips, hints, reminders etc.
10.04.14 08:20:42 pm
like I like it!
Up
H-X
User
Offline Off
I had this idea for more than a year.

Simple and effective.
10.04.14 08:11:48 pm
Up
Alistaire
User
Offline Off
Code:
1
2
3
4
5
color = {
          "216116116", --You can add as many RGB colors as you want
          "255255255",
          "255220000",
},


Well that will break.
To the start Previous 1 2 Next To the start