Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Brett900 on January 15, 2007, 11:08:42 AM

Title: How to add a advert?
Post by: Brett900 on January 15, 2007, 11:08:42 AM
Ok, i'm looking at my Garrysmod/lua/ulx/configs/server.ini and i'm confused on this hole section.

Code: [Select]
// Adverts
// addCsayAdvert <msg> <r> <g> <b> <repeat_time> <length> [<group>]
// addAdvert <msg> <repeat_time> [<group>]
// addCsayAdvert puts adverts in the middle of the screen, addAdvert puts adverts in the text area.
// You can use %host%, %curmap%, and %ulx_version% in your message and have it automagically parsed for you.
// If you specify a group, adverts in that group will run sequentially instead of simultaneously. EX:
// ulx addAdvert "This message is run first" 10 a
// ulx addAdvert "This message is run second" 10 a
ulx addCsayAdvert "You're playing on %host%, Enjoy your stay!"100 255 200 300 10

// Please, if you have any compassion at all, leave this one in.
ulx addAdvert "This server is running ULX version %ulx_version% from ulyssesmod.net" 360

I really don't know how to make a advert useing this code.
Code: [Select]
addCsayAdvert <msg> <r> <g> <b> <repeat_time> <length> [<group>]Or this one.
Code: [Select]
addAdvert <msg> <repeat_time> [<group>]
Even if i could were would i put the new advert?

Can someone help me? Please?
Title: Re: How to add a advert?
Post by: Golden-Death on January 15, 2007, 11:21:58 AM
// addCsayAdvert <msg> <r> <g> <repeat_time> <length> [<group>]
// addAdvert <msg> <repeat_time> [<group>]
// addCsayAdvert puts adverts in the middle of the screen, addAdvert puts adverts in the text area.
// You can use %host%, %curmap%, and %ulx_version% in your message and have it automagically parsed for you.
// If you specify a group, adverts in that group will run sequentially instead of simultaneously. EX:
// ulx addAdvert "This message is run first" 10 a
// ulx addAdvert "This message is run second" 10 a
ulx addCsayAdvert "You're playing on %host%, Enjoy your stay!"100 255 200 300 10

// Please, if you have any compassion at all, leave this one in.
ulx addAdvert "This server is running ULX version %ulx_version% from ulyssesmod.net" 360


// just put it here
ulx addAdvert "I'm a monkey!" 361
Title: Re: How to add a advert?
Post by: Megiddo on January 15, 2007, 11:34:03 AM
GD's right, put it anywhere.
Title: Re: How to add a advert?
Post by: Brett900 on January 15, 2007, 06:09:32 PM
Do the #'s always need to be diffrent?
Title: Re: How to add a advert?
Post by: Megiddo on January 15, 2007, 07:36:00 PM
Only if you want them to be.
Title: Re: How to add a advert?
Post by: Brett900 on January 16, 2007, 07:37:18 AM
Ok, i put them all at diffrent numbers. To me it seems like its the time peroid before they advert again. BUT, it somtimes even though there are diffrent numbers they all come up at the same time. i want them to be sepreate.

Help please.
Title: Re: How to add a advert?
Post by: JamminR on January 16, 2007, 04:08:56 PM
*sigh* let me try this one guys.

Brett.
Let start with the simplest.
// addAdvert <msg> <repeat_time> [<group>]

if you use
ulx addAdvert "I'm a monkey!" 360

This would repeat every 6 minutes

if you use
1) ulx addAdvert "I'm a monkey!" 360
This would repeat every 6 minutes
2) ulx addAdvert "He's a monkey" 390
This would repeat every 6 minutes, 30 seconds.

Now, I believe here is where you might be getting confused. The way I just listed those two, they would only be 30 seconds apart the first time they were advertised.
They don't run at the same time.
Look at this math. (seconds were converted to minutes for easy viewing)
1) would print at (6),(12),(18),(24),(30),(36)
2) would print at (6.5),(13),(19.5),(26),(32.5),(39)
See how the times start growing apart? Depending on what numbers you chose, they usually start circling in on each other.
I see most people confusing that.

HOWEVER, if you want 2) to run 30 seconds after 1) all the time. You'd specify a groupname for both.
1) ulx addAdvert "I'm a monkey!" 360 monkey
2) ulx addAdvert "He's a monkey" 390 monkey

2) would always be 30 seconds after 1)

That help?


Title: Re: How to add a advert?
Post by: Megiddo on January 16, 2007, 06:09:11 PM
1) ulx addAdvert "I'm a monkey!" 360 monkey
2) ulx addAdvert "He's a monkey" 390 monkey

2) would always be 30 seconds after 1)

That help?
Actually it would be:
1) ulx addAdvert "I'm a monkey!" 360 monkey
2) ulx addAdvert "He's a monkey" 30 monkey

Otherwise, great explaination JamminR! :)
Title: Re: How to add a advert?
Post by: Brett900 on January 17, 2007, 08:30:11 AM
Alright, thank you. I will re-post if i'm doing anything wrong.