The online racing simulator
How to sent message from LFSLapper to Discord.
I want to show lfs server messages in Discord, how can I do it? can you help me?
First you have to connect to your Discord bot.

Open Myinc.LPR file in the includes folder.


<?php 
#####DISCORD VARIABLES#####
$DiscordToken "";
$DiscordChannelReceive ""#discordchannel to sent commands to LFSLapper. (Rightclick on the channel and click 'Copy ID')
$DiscordBotStatus "Powered by LFSLapper";
?>

Once your LFSLapper is connected to your DiscordBot .Check the console for the next message: DiscordBot Connected

Open LFSLapper.LPR and look for the next event: Event OnMSO
And create a new command like shown below.

The function to send messages from LFSLapper to Discord can be done with:

sendmessagetodiscord($DiscordChannel,$Message);


<?php 
Event OnMSO
$userName$text # Player event
    
$idxOfFirtsSpace indexOf$text" ");

    IF( 
$idxOfFirtsSpace == -THEN
      $command 
$text;
      
$argv "";
    ELSE
      
$command subStr$text,0,$idxOfFirtsSpace );
      
$argv trimsubStr$text,$idxOfFirtsSpace ) );
    ENDIF
    
    SWITCH( 
$command )
         CASE 
"!message":
              
$Message $argv;
              
$DiscordChannel "";
              
sendmessagetodiscord($DiscordChannel,$Message);
         BREAK;    
    ENDSWITCH
EndEvent
?>


-
(EfsaneTosun) DELETED by Yisc[NL] : Cracking has nothing to do with LFSLapper
Thanks for your answer but I put the code in "Lapper.lpr" file, bot connection failed.
Show us some pictures of the error and the code.
Is your discord token right?
token correct code incorrect
Is it possible to send lap time from lapper to Discord ?
Quote from neron59 :Is it possible to send lap time from lapper to Discord ?

yes NumToMSH(GetCurrentPlayerVar("SplitTime")),GetCurrentPlayerVar("NickName") ) );
Ok, i don't know this fonction was possible, i have to see that.
Where is this Line ?
TRI_split ----- TRI_lap

Search for them in the lapper file. you will see...
Thank you, have a good Day ✌️
Quote from canbayramm1 :token correct code incorrect

canbayramm beni discorddan eklermisin bişey diyicem sana öğretebilirim

dc : suicdff
beni unutmamışsındır inşallah abim Big grin

FGED GREDG RDFGDR GSFDG