The online racing simulator
Auto Announcements?
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.
#2 - Krayy
Quote from Backtrack3d :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.

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.
Not like popups on the screen.. Messages in the text box. And probably about every 2 minutes.
#4 - Krayy
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:


<?php 
CatchEvent OnLapperStart
()
    
DelayedCommand120ShowAnnouncement );
EndCatchEvent

Sub ShowAnnouncement 
()
    
globalMsg"Visit our website at http://isntthisannoying.com");
    
DelayedCommand120ShowAnnouncement );
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.
Hello,

Better method is registered action

Gai-Luron
#6 - Krayy
Quote from Gai-Luron :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
Quote from emit-nl :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 );

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

why not
RegisterScheduleAction( "1 00 * * * * *:1 10 * * * * *:1 20 * * * * *:1 30 * * * * *:1 40 * * * * *:1 50 * * * * *", SA_visitus );

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

FGED GREDG RDFGDR GSFDG