View Full Version : Auto Announcements?
Backtrack3d
18th January 2010, 01:46
How could i make the lapper, or the server itself to where there is auto messages pop up on the screen, like say every minute. Things like your website, information, etc?
If someone could help me out with this, It would me much appricated. :razz:
Krayy
18th January 2010, 02:16
How could i make the lapper, or the server itself to where there is auto messages pop up on the screen, like say every minute. Things like your website, information, etc?
If someone could help me out with this, It would me much appricated. :razz:
It can be done fairly easily using Lapper, but here's why I won't tell you how:
If you're throwing pop ups every minute or two advertising a web site or something, then how are the players meant to race? People would get so annoyed with the pop ups that they won't want to race on your servers.
Backtrack3d
18th January 2010, 06:49
Not like popups on the screen.. Messages in the text box. And probably about every 2 minutes.
Krayy
18th January 2010, 07:31
You would be better to print the message (web site or whatever) when a particular event occurs, like a Race Start, or as the player leaves the pits. Have a look around the code for the events OnRaceStart, OnNewPlayerJoin, and OnConnect.
From a coding perspective however, here's how to do a recursive function:
CatchEvent OnLapperStart()
DelayedCommand( 120, ShowAnnouncement );
EndCatchEvent
Sub ShowAnnouncement ()
globalMsg( "Visit our website at http://isntthisannoying.com");
DelayedCommand( 120, ShowAnnouncement );
EndSub
That will display the announcement every 2 mins and people will be compelled to visit your website that often, and do this -> :banghead:
PS: You will not be able to stop it.
Gai-Luron
18th January 2010, 07:46
Hello,
Better method is registered action
Gai-Luron
Krayy
18th January 2010, 08:17
Hello,
Better method is registered action
Gai-Luron
Good point
emit-nl
18th January 2010, 17:51
Hello,
Better method is registered action
Gai-Luron
That's right! This is exactly what I'm using for my hosts..
In the event section of LFSLapper.lpr:
RegisterScheduleAction( "1 00 * * * * *:1 10 * * * * *:1 20 * * * * *:1 30 * * * * *:1 40 * * * * *:1 50 * * * * *", SA_visitus );
AND
Sub SA_visitus() # Lapper Event
globalMsg( langEngine( "%{main_visitus}%" ) );
EndSub
In the language section:
main_visitus = "^1» ^6Visit us: ^7http://www.sinsanity.nl";
This message will be shown every 10minutes (beleve me, every 10 minutes is frequent enough!!)
You can see it in all Sinsanity hosts: $!N - Demo, $!N - Drift, $!N - Race #1 and $!N - Race #2
Tim
Fire_optikz001
18th January 2010, 18:08
That's right! This is exactly what I'm using for my hosts..
In the event section of LFSLapper.lpr:
RegisterScheduleAction( "1 00 * * * * *", SA_visitus );
RegisterScheduleAction( "1 10 * * * * *", SA_visitus );
RegisterScheduleAction( "1 20 * * * * *", SA_visitus );
RegisterScheduleAction( "1 30 * * * * *", SA_visitus );
RegisterScheduleAction( "1 40 * * * * *", SA_visitus );
RegisterScheduleAction( "1 50 * * * * *", SA_visitus );ANDSub SA_visitus() # Lapper Event
globalMsg( langEngine( "%{main_visitus}%" ) );
EndSubIn the language section:
main_visitus = "^1» ^6Visit us: ^7http://www.sinsanity.nl";This message will be shown every 10minutes (beleve me, every 10 minutes is frequent enough!!)
You can see it in all Sinsanity hosts: $!N - Demo, $!N - Drift, $!N - Race #1 and $!N - Race #2
Tim
why not RegisterScheduleAction( "1 00 * * * * *:1 10 * * * * *:1 20 * * * * *:1 30 * * * * *:1 40 * * * * *:1 50 * * * * *", SA_visitus );
emit-nl
18th January 2010, 18:18
LOL!! Thanks mate.. It seriously didn't came up in me this would be possible!
I'll edit my post and my LFSLapper script :)
Thanks
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.